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);
                }
            }
        }
Пример #2
0
        public AbsoluteTolerance(XmlNode xmlNode)
        {
            XmlNode positiveNode = xmlNode.SelectSingleNode("positive");

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


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

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


            XmlNode unitNode = xmlNode.SelectSingleNode("unit");

            if (unitNode != null)
            {
                if (unitNode.Attributes["href"] != null || unitNode.Attributes["id"] != null)
                {
                    if (unitNode.Attributes["id"] != null)
                    {
                        unitIDRef_ = unitNode.Attributes["id"].Value;
                        QuantityUnit ob = new QuantityUnit(unitNode);
                        IDManager.SetID(unitIDRef_, ob);
                    }
                    else if (unitNode.Attributes["href"] != null)
                    {
                        unitIDRef_ = unitNode.Attributes["href"].Value;
                    }
                    else
                    {
                        unit_ = new QuantityUnit(unitNode);
                    }
                }
                else
                {
                    unit_ = new QuantityUnit(unitNode);
                }
            }


            XmlNode optionOwnerPartyReferenceNode = xmlNode.SelectSingleNode("optionOwnerPartyReference");

            if (optionOwnerPartyReferenceNode != null)
            {
                if (optionOwnerPartyReferenceNode.Attributes["href"] != null || optionOwnerPartyReferenceNode.Attributes["id"] != null)
                {
                    if (optionOwnerPartyReferenceNode.Attributes["id"] != null)
                    {
                        optionOwnerPartyReferenceIDRef_ = optionOwnerPartyReferenceNode.Attributes["id"].Value;
                        PartyReference ob = new PartyReference(optionOwnerPartyReferenceNode);
                        IDManager.SetID(optionOwnerPartyReferenceIDRef_, ob);
                    }
                    else if (optionOwnerPartyReferenceNode.Attributes["href"] != null)
                    {
                        optionOwnerPartyReferenceIDRef_ = optionOwnerPartyReferenceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        optionOwnerPartyReference_ = new PartyReference(optionOwnerPartyReferenceNode);
                    }
                }
                else
                {
                    optionOwnerPartyReference_ = new PartyReference(optionOwnerPartyReferenceNode);
                }
            }
        }
Пример #3
0
        public CorrespondentInformation(XmlNode xmlNode)
        {
            XmlNode routingIdsNode = xmlNode.SelectSingleNode("routingIds");

            if (routingIdsNode != null)
            {
                if (routingIdsNode.Attributes["href"] != null || routingIdsNode.Attributes["id"] != null)
                {
                    if (routingIdsNode.Attributes["id"] != null)
                    {
                        routingIdsIDRef_ = routingIdsNode.Attributes["id"].Value;
                        RoutingIds ob = new RoutingIds(routingIdsNode);
                        IDManager.SetID(routingIdsIDRef_, ob);
                    }
                    else if (routingIdsNode.Attributes["href"] != null)
                    {
                        routingIdsIDRef_ = routingIdsNode.Attributes["href"].Value;
                    }
                    else
                    {
                        routingIds_ = new RoutingIds(routingIdsNode);
                    }
                }
                else
                {
                    routingIds_ = new RoutingIds(routingIdsNode);
                }
            }


            XmlNode routingExplicitDetailsNode = xmlNode.SelectSingleNode("routingExplicitDetails");

            if (routingExplicitDetailsNode != null)
            {
                if (routingExplicitDetailsNode.Attributes["href"] != null || routingExplicitDetailsNode.Attributes["id"] != null)
                {
                    if (routingExplicitDetailsNode.Attributes["id"] != null)
                    {
                        routingExplicitDetailsIDRef_ = routingExplicitDetailsNode.Attributes["id"].Value;
                        RoutingExplicitDetails ob = new RoutingExplicitDetails(routingExplicitDetailsNode);
                        IDManager.SetID(routingExplicitDetailsIDRef_, ob);
                    }
                    else if (routingExplicitDetailsNode.Attributes["href"] != null)
                    {
                        routingExplicitDetailsIDRef_ = routingExplicitDetailsNode.Attributes["href"].Value;
                    }
                    else
                    {
                        routingExplicitDetails_ = new RoutingExplicitDetails(routingExplicitDetailsNode);
                    }
                }
                else
                {
                    routingExplicitDetails_ = new RoutingExplicitDetails(routingExplicitDetailsNode);
                }
            }


            XmlNode routingIdsAndExplicitDetailsNode = xmlNode.SelectSingleNode("routingIdsAndExplicitDetails");

            if (routingIdsAndExplicitDetailsNode != null)
            {
                if (routingIdsAndExplicitDetailsNode.Attributes["href"] != null || routingIdsAndExplicitDetailsNode.Attributes["id"] != null)
                {
                    if (routingIdsAndExplicitDetailsNode.Attributes["id"] != null)
                    {
                        routingIdsAndExplicitDetailsIDRef_ = routingIdsAndExplicitDetailsNode.Attributes["id"].Value;
                        RoutingIdsAndExplicitDetails ob = new RoutingIdsAndExplicitDetails(routingIdsAndExplicitDetailsNode);
                        IDManager.SetID(routingIdsAndExplicitDetailsIDRef_, ob);
                    }
                    else if (routingIdsAndExplicitDetailsNode.Attributes["href"] != null)
                    {
                        routingIdsAndExplicitDetailsIDRef_ = routingIdsAndExplicitDetailsNode.Attributes["href"].Value;
                    }
                    else
                    {
                        routingIdsAndExplicitDetails_ = new RoutingIdsAndExplicitDetails(routingIdsAndExplicitDetailsNode);
                    }
                }
                else
                {
                    routingIdsAndExplicitDetails_ = new RoutingIdsAndExplicitDetails(routingIdsAndExplicitDetailsNode);
                }
            }


            XmlNode correspondentPartyReferenceNode = xmlNode.SelectSingleNode("correspondentPartyReference");

            if (correspondentPartyReferenceNode != null)
            {
                if (correspondentPartyReferenceNode.Attributes["href"] != null || correspondentPartyReferenceNode.Attributes["id"] != null)
                {
                    if (correspondentPartyReferenceNode.Attributes["id"] != null)
                    {
                        correspondentPartyReferenceIDRef_ = correspondentPartyReferenceNode.Attributes["id"].Value;
                        PartyReference ob = new PartyReference(correspondentPartyReferenceNode);
                        IDManager.SetID(correspondentPartyReferenceIDRef_, ob);
                    }
                    else if (correspondentPartyReferenceNode.Attributes["href"] != null)
                    {
                        correspondentPartyReferenceIDRef_ = correspondentPartyReferenceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        correspondentPartyReference_ = new PartyReference(correspondentPartyReferenceNode);
                    }
                }
                else
                {
                    correspondentPartyReference_ = new PartyReference(correspondentPartyReferenceNode);
                }
            }
        }
Пример #4
0
        public Excel_singleRangeEventCal(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNode lowerRngNode = xmlNode.SelectSingleNode("lowerRng");

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


            XmlNode upperRngNode = xmlNode.SelectSingleNode("upperRng");

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


            XmlNode excel_underlyingCalcIDNode = xmlNode.SelectSingleNode("excel_underlyingCalcID");

            if (excel_underlyingCalcIDNode != null)
            {
                if (excel_underlyingCalcIDNode.Attributes["href"] != null || excel_underlyingCalcIDNode.Attributes["id"] != null)
                {
                    if (excel_underlyingCalcIDNode.Attributes["id"] != null)
                    {
                        excel_underlyingCalcIDIDRef_ = excel_underlyingCalcIDNode.Attributes["id"].Value;
                        Excel_underlyingCalcID ob = new Excel_underlyingCalcID(excel_underlyingCalcIDNode);
                        IDManager.SetID(excel_underlyingCalcIDIDRef_, ob);
                    }
                    else if (excel_underlyingCalcIDNode.Attributes["href"] != null)
                    {
                        excel_underlyingCalcIDIDRef_ = excel_underlyingCalcIDNode.Attributes["href"].Value;
                    }
                    else
                    {
                        excel_underlyingCalcID_ = new Excel_underlyingCalcID(excel_underlyingCalcIDNode);
                    }
                }
                else
                {
                    excel_underlyingCalcID_ = new Excel_underlyingCalcID(excel_underlyingCalcIDNode);
                }
            }
        }
        public Excel_volSurface(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNode refDateNode = xmlNode.SelectSingleNode("refDate");

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


            XmlNode codeNode = xmlNode.SelectSingleNode("code");

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


            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);
                }
            }


            XmlNodeList tenorNodeList = xmlNode.SelectNodes("tenor");

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


            XmlNodeList strikeNodeList = xmlNode.SelectNodes("strike");

            if (strikeNodeList != null)
            {
                this.strike_ = new List <XsdTypeToken>();
                foreach (XmlNode item in strikeNodeList)
                {
                    if (item.Attributes["href"] != null || item.Attributes["id"] != null)
                    {
                        if (item.Attributes["id"] != null)
                        {
                            strikeIDRef_ = item.Attributes["id"].Value;
                            strike_.Add(new XsdTypeToken(item));
                            IDManager.SetID(strikeIDRef_, strike_[strike_.Count - 1]);
                        }
                        else if (item.Attributes["href"] != null)
                        {
                            strikeIDRef_ = item.Attributes["href"].Value;
                        }
                        else
                        {
                            strike_.Add(new XsdTypeToken(item));
                        }
                    }
                    else
                    {
                        strike_.Add(new XsdTypeToken(item));
                    }
                }
            }
        }
        public CreditCurve(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNode referenceEntityNode = xmlNode.SelectSingleNode("referenceEntity");

            if (referenceEntityNode != null)
            {
                if (referenceEntityNode.Attributes["href"] != null || referenceEntityNode.Attributes["id"] != null)
                {
                    if (referenceEntityNode.Attributes["id"] != null)
                    {
                        referenceEntityIDRef_ = referenceEntityNode.Attributes["id"].Value;
                        LegalEntity ob = new LegalEntity(referenceEntityNode);
                        IDManager.SetID(referenceEntityIDRef_, ob);
                    }
                    else if (referenceEntityNode.Attributes["href"] != null)
                    {
                        referenceEntityIDRef_ = referenceEntityNode.Attributes["href"].Value;
                    }
                    else
                    {
                        referenceEntity_ = new LegalEntity(referenceEntityNode);
                    }
                }
                else
                {
                    referenceEntity_ = new LegalEntity(referenceEntityNode);
                }
            }


            XmlNode creditEntityReferenceNode = xmlNode.SelectSingleNode("creditEntityReference");

            if (creditEntityReferenceNode != null)
            {
                if (creditEntityReferenceNode.Attributes["href"] != null || creditEntityReferenceNode.Attributes["id"] != null)
                {
                    if (creditEntityReferenceNode.Attributes["id"] != null)
                    {
                        creditEntityReferenceIDRef_ = creditEntityReferenceNode.Attributes["id"].Value;
                        LegalEntityReference ob = new LegalEntityReference(creditEntityReferenceNode);
                        IDManager.SetID(creditEntityReferenceIDRef_, ob);
                    }
                    else if (creditEntityReferenceNode.Attributes["href"] != null)
                    {
                        creditEntityReferenceIDRef_ = creditEntityReferenceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        creditEntityReference_ = new LegalEntityReference(creditEntityReferenceNode);
                    }
                }
                else
                {
                    creditEntityReference_ = new LegalEntityReference(creditEntityReferenceNode);
                }
            }


            XmlNode creditEventsNode = xmlNode.SelectSingleNode("creditEvents");

            if (creditEventsNode != null)
            {
                if (creditEventsNode.Attributes["href"] != null || creditEventsNode.Attributes["id"] != null)
                {
                    if (creditEventsNode.Attributes["id"] != null)
                    {
                        creditEventsIDRef_ = creditEventsNode.Attributes["id"].Value;
                        CreditEvents ob = new CreditEvents(creditEventsNode);
                        IDManager.SetID(creditEventsIDRef_, ob);
                    }
                    else if (creditEventsNode.Attributes["href"] != null)
                    {
                        creditEventsIDRef_ = creditEventsNode.Attributes["href"].Value;
                    }
                    else
                    {
                        creditEvents_ = new CreditEvents(creditEventsNode);
                    }
                }
                else
                {
                    creditEvents_ = new CreditEvents(creditEventsNode);
                }
            }


            XmlNode seniorityNode = xmlNode.SelectSingleNode("seniority");

            if (seniorityNode != null)
            {
                if (seniorityNode.Attributes["href"] != null || seniorityNode.Attributes["id"] != null)
                {
                    if (seniorityNode.Attributes["id"] != null)
                    {
                        seniorityIDRef_ = seniorityNode.Attributes["id"].Value;
                        CreditSeniority ob = new CreditSeniority(seniorityNode);
                        IDManager.SetID(seniorityIDRef_, ob);
                    }
                    else if (seniorityNode.Attributes["href"] != null)
                    {
                        seniorityIDRef_ = seniorityNode.Attributes["href"].Value;
                    }
                    else
                    {
                        seniority_ = new CreditSeniority(seniorityNode);
                    }
                }
                else
                {
                    seniority_ = new CreditSeniority(seniorityNode);
                }
            }


            XmlNode securedNode = xmlNode.SelectSingleNode("secured");

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


            XmlNode obligationCurrencyNode = xmlNode.SelectSingleNode("obligationCurrency");

            if (obligationCurrencyNode != null)
            {
                if (obligationCurrencyNode.Attributes["href"] != null || obligationCurrencyNode.Attributes["id"] != null)
                {
                    if (obligationCurrencyNode.Attributes["id"] != null)
                    {
                        obligationCurrencyIDRef_ = obligationCurrencyNode.Attributes["id"].Value;
                        Currency ob = new Currency(obligationCurrencyNode);
                        IDManager.SetID(obligationCurrencyIDRef_, ob);
                    }
                    else if (obligationCurrencyNode.Attributes["href"] != null)
                    {
                        obligationCurrencyIDRef_ = obligationCurrencyNode.Attributes["href"].Value;
                    }
                    else
                    {
                        obligationCurrency_ = new Currency(obligationCurrencyNode);
                    }
                }
                else
                {
                    obligationCurrency_ = new Currency(obligationCurrencyNode);
                }
            }


            XmlNode obligationsNode = xmlNode.SelectSingleNode("obligations");

            if (obligationsNode != null)
            {
                if (obligationsNode.Attributes["href"] != null || obligationsNode.Attributes["id"] != null)
                {
                    if (obligationsNode.Attributes["id"] != null)
                    {
                        obligationsIDRef_ = obligationsNode.Attributes["id"].Value;
                        Obligations ob = new Obligations(obligationsNode);
                        IDManager.SetID(obligationsIDRef_, ob);
                    }
                    else if (obligationsNode.Attributes["href"] != null)
                    {
                        obligationsIDRef_ = obligationsNode.Attributes["href"].Value;
                    }
                    else
                    {
                        obligations_ = new Obligations(obligationsNode);
                    }
                }
                else
                {
                    obligations_ = new Obligations(obligationsNode);
                }
            }


            XmlNode deliverableObligationsNode = xmlNode.SelectSingleNode("deliverableObligations");

            if (deliverableObligationsNode != null)
            {
                if (deliverableObligationsNode.Attributes["href"] != null || deliverableObligationsNode.Attributes["id"] != null)
                {
                    if (deliverableObligationsNode.Attributes["id"] != null)
                    {
                        deliverableObligationsIDRef_ = deliverableObligationsNode.Attributes["id"].Value;
                        DeliverableObligations ob = new DeliverableObligations(deliverableObligationsNode);
                        IDManager.SetID(deliverableObligationsIDRef_, ob);
                    }
                    else if (deliverableObligationsNode.Attributes["href"] != null)
                    {
                        deliverableObligationsIDRef_ = deliverableObligationsNode.Attributes["href"].Value;
                    }
                    else
                    {
                        deliverableObligations_ = new DeliverableObligations(deliverableObligationsNode);
                    }
                }
                else
                {
                    deliverableObligations_ = new DeliverableObligations(deliverableObligationsNode);
                }
            }
        }
        public FxOptionFeatures(XmlNode xmlNode)
        {
            XmlNode asianNode = xmlNode.SelectSingleNode("asian");

            if (asianNode != null)
            {
                if (asianNode.Attributes["href"] != null || asianNode.Attributes["id"] != null)
                {
                    if (asianNode.Attributes["id"] != null)
                    {
                        asianIDRef_ = asianNode.Attributes["id"].Value;
                        FxAsianFeature ob = new FxAsianFeature(asianNode);
                        IDManager.SetID(asianIDRef_, ob);
                    }
                    else if (asianNode.Attributes["href"] != null)
                    {
                        asianIDRef_ = asianNode.Attributes["href"].Value;
                    }
                    else
                    {
                        asian_ = new FxAsianFeature(asianNode);
                    }
                }
                else
                {
                    asian_ = new FxAsianFeature(asianNode);
                }
            }


            XmlNodeList barrierNodeList = xmlNode.SelectNodes("barrier");

            if (barrierNodeList != null)
            {
                this.barrier_ = new List <FxBarrierFeature>();
                foreach (XmlNode item in barrierNodeList)
                {
                    if (item.Attributes["href"] != null || item.Attributes["id"] != null)
                    {
                        if (item.Attributes["id"] != null)
                        {
                            barrierIDRef_ = item.Attributes["id"].Value;
                            barrier_.Add(new FxBarrierFeature(item));
                            IDManager.SetID(barrierIDRef_, barrier_[barrier_.Count - 1]);
                        }
                        else if (item.Attributes["href"] != null)
                        {
                            barrierIDRef_ = item.Attributes["href"].Value;
                        }
                        else
                        {
                            barrier_.Add(new FxBarrierFeature(item));
                        }
                    }
                    else
                    {
                        barrier_.Add(new FxBarrierFeature(item));
                    }
                }
            }
        }
Пример #8
0
        public EarlyTerminationProvision(XmlNode xmlNode)
        {
            XmlNode mandatoryEarlyTerminationNode = xmlNode.SelectSingleNode("mandatoryEarlyTermination");

            if (mandatoryEarlyTerminationNode != null)
            {
                if (mandatoryEarlyTerminationNode.Attributes["href"] != null || mandatoryEarlyTerminationNode.Attributes["id"] != null)
                {
                    if (mandatoryEarlyTerminationNode.Attributes["id"] != null)
                    {
                        mandatoryEarlyTerminationIDRef_ = mandatoryEarlyTerminationNode.Attributes["id"].Value;
                        MandatoryEarlyTermination ob = new MandatoryEarlyTermination(mandatoryEarlyTerminationNode);
                        IDManager.SetID(mandatoryEarlyTerminationIDRef_, ob);
                    }
                    else if (mandatoryEarlyTerminationNode.Attributes["href"] != null)
                    {
                        mandatoryEarlyTerminationIDRef_ = mandatoryEarlyTerminationNode.Attributes["href"].Value;
                    }
                    else
                    {
                        mandatoryEarlyTermination_ = new MandatoryEarlyTermination(mandatoryEarlyTerminationNode);
                    }
                }
                else
                {
                    mandatoryEarlyTermination_ = new MandatoryEarlyTermination(mandatoryEarlyTerminationNode);
                }
            }


            XmlNode mandatoryEarlyTerminationDateTenorNode = xmlNode.SelectSingleNode("mandatoryEarlyTerminationDateTenor");

            if (mandatoryEarlyTerminationDateTenorNode != null)
            {
                if (mandatoryEarlyTerminationDateTenorNode.Attributes["href"] != null || mandatoryEarlyTerminationDateTenorNode.Attributes["id"] != null)
                {
                    if (mandatoryEarlyTerminationDateTenorNode.Attributes["id"] != null)
                    {
                        mandatoryEarlyTerminationDateTenorIDRef_ = mandatoryEarlyTerminationDateTenorNode.Attributes["id"].Value;
                        Period ob = new Period(mandatoryEarlyTerminationDateTenorNode);
                        IDManager.SetID(mandatoryEarlyTerminationDateTenorIDRef_, ob);
                    }
                    else if (mandatoryEarlyTerminationDateTenorNode.Attributes["href"] != null)
                    {
                        mandatoryEarlyTerminationDateTenorIDRef_ = mandatoryEarlyTerminationDateTenorNode.Attributes["href"].Value;
                    }
                    else
                    {
                        mandatoryEarlyTerminationDateTenor_ = new Period(mandatoryEarlyTerminationDateTenorNode);
                    }
                }
                else
                {
                    mandatoryEarlyTerminationDateTenor_ = new Period(mandatoryEarlyTerminationDateTenorNode);
                }
            }


            XmlNode optionalEarlyTerminationNode = xmlNode.SelectSingleNode("optionalEarlyTermination");

            if (optionalEarlyTerminationNode != null)
            {
                if (optionalEarlyTerminationNode.Attributes["href"] != null || optionalEarlyTerminationNode.Attributes["id"] != null)
                {
                    if (optionalEarlyTerminationNode.Attributes["id"] != null)
                    {
                        optionalEarlyTerminationIDRef_ = optionalEarlyTerminationNode.Attributes["id"].Value;
                        OptionalEarlyTermination ob = new OptionalEarlyTermination(optionalEarlyTerminationNode);
                        IDManager.SetID(optionalEarlyTerminationIDRef_, ob);
                    }
                    else if (optionalEarlyTerminationNode.Attributes["href"] != null)
                    {
                        optionalEarlyTerminationIDRef_ = optionalEarlyTerminationNode.Attributes["href"].Value;
                    }
                    else
                    {
                        optionalEarlyTermination_ = new OptionalEarlyTermination(optionalEarlyTerminationNode);
                    }
                }
                else
                {
                    optionalEarlyTermination_ = new OptionalEarlyTermination(optionalEarlyTerminationNode);
                }
            }


            XmlNode optionalEarlyTerminationParametersNode = xmlNode.SelectSingleNode("optionalEarlyTerminationParameters");

            if (optionalEarlyTerminationParametersNode != null)
            {
                if (optionalEarlyTerminationParametersNode.Attributes["href"] != null || optionalEarlyTerminationParametersNode.Attributes["id"] != null)
                {
                    if (optionalEarlyTerminationParametersNode.Attributes["id"] != null)
                    {
                        optionalEarlyTerminationParametersIDRef_ = optionalEarlyTerminationParametersNode.Attributes["id"].Value;
                        ExercisePeriod ob = new ExercisePeriod(optionalEarlyTerminationParametersNode);
                        IDManager.SetID(optionalEarlyTerminationParametersIDRef_, ob);
                    }
                    else if (optionalEarlyTerminationParametersNode.Attributes["href"] != null)
                    {
                        optionalEarlyTerminationParametersIDRef_ = optionalEarlyTerminationParametersNode.Attributes["href"].Value;
                    }
                    else
                    {
                        optionalEarlyTerminationParameters_ = new ExercisePeriod(optionalEarlyTerminationParametersNode);
                    }
                }
                else
                {
                    optionalEarlyTerminationParameters_ = new ExercisePeriod(optionalEarlyTerminationParametersNode);
                }
            }
        }
        public Clearing(XmlNode xmlNode)
        {
            XmlNode submittedNode = xmlNode.SelectSingleNode("submitted");

            if (submittedNode != null)
            {
                if (submittedNode.Attributes["href"] != null || submittedNode.Attributes["id"] != null)
                {
                    if (submittedNode.Attributes["id"] != null)
                    {
                        submittedIDRef_ = submittedNode.Attributes["id"].Value;
                        TradeWrapper ob = new TradeWrapper(submittedNode);
                        IDManager.SetID(submittedIDRef_, ob);
                    }
                    else if (submittedNode.Attributes["href"] != null)
                    {
                        submittedIDRef_ = submittedNode.Attributes["href"].Value;
                    }
                    else
                    {
                        submitted_ = new TradeWrapper(submittedNode);
                    }
                }
                else
                {
                    submitted_ = new TradeWrapper(submittedNode);
                }
            }


            XmlNodeList clearedNodeList = xmlNode.SelectNodes("cleared");

            if (clearedNodeList != null)
            {
                this.cleared_ = new List <TradeWrapper>();
                foreach (XmlNode item in clearedNodeList)
                {
                    if (item.Attributes["href"] != null || item.Attributes["id"] != null)
                    {
                        if (item.Attributes["id"] != null)
                        {
                            clearedIDRef_ = item.Attributes["id"].Value;
                            cleared_.Add(new TradeWrapper(item));
                            IDManager.SetID(clearedIDRef_, cleared_[cleared_.Count - 1]);
                        }
                        else if (item.Attributes["href"] != null)
                        {
                            clearedIDRef_ = item.Attributes["href"].Value;
                        }
                        else
                        {
                            cleared_.Add(new TradeWrapper(item));
                        }
                    }
                    else
                    {
                        cleared_.Add(new TradeWrapper(item));
                    }
                }
            }
        }
        public EnvironmentalProduct(XmlNode xmlNode)
        {
            XmlNodeList productTypeNodeList = xmlNode.SelectNodes("productType");

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

            foreach (XmlNode item in productTypeNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        productTypeIDRef = item.Attributes["id"].Name;
                        EnvironmentalProductTypeEnum ob = EnvironmentalProductTypeEnum();
                        IDManager.SetID(productTypeIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        productTypeIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        productType = new EnvironmentalProductTypeEnum(item);
                    }
                }
            }


            XmlNodeList compliancePeriodNodeList = xmlNode.SelectNodes("compliancePeriod");

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

            foreach (XmlNode item in compliancePeriodNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        compliancePeriodIDRef = item.Attributes["id"].Name;
                        EnvironmentalProductComplaincePeriod ob = EnvironmentalProductComplaincePeriod();
                        IDManager.SetID(compliancePeriodIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        compliancePeriodIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        compliancePeriod = new EnvironmentalProductComplaincePeriod(item);
                    }
                }
            }


            XmlNodeList vintageNodeList = xmlNode.SelectNodes("vintage");

            foreach (XmlNode item in vintageNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        vintageIDRef = item.Attributes["id"].Name;
                        XsdTypeGYear ob = new XsdTypeGYear();
                        ob.Add(new XsdTypeGYear(item));
                        IDManager.SetID(vintageIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        vintageIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        vintage.Add(new XsdTypeGYear(item));
                    }
                }
            }


            XmlNodeList applicableLawNodeList = xmlNode.SelectNodes("applicableLaw");

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

            foreach (XmlNode item in applicableLawNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        applicableLawIDRef = item.Attributes["id"].Name;
                        EnvironmentalProductApplicableLaw ob = EnvironmentalProductApplicableLaw();
                        IDManager.SetID(applicableLawIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        applicableLawIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        applicableLaw = new EnvironmentalProductApplicableLaw(item);
                    }
                }
            }


            XmlNodeList trackingSystemNodeList = xmlNode.SelectNodes("trackingSystem");

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

            foreach (XmlNode item in trackingSystemNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        trackingSystemIDRef = item.Attributes["id"].Name;
                        EnvironmentalTrackingSystem ob = EnvironmentalTrackingSystem();
                        IDManager.SetID(trackingSystemIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        trackingSystemIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        trackingSystem = new EnvironmentalTrackingSystem(item);
                    }
                }
            }
        }
        public IndexReferenceInformation(XmlNode xmlNode)
        {
            XmlNode indexNameNode = xmlNode.SelectSingleNode("indexName");

            if (indexNameNode != null)
            {
                if (indexNameNode.Attributes["href"] != null || indexNameNode.Attributes["id"] != null)
                {
                    if (indexNameNode.Attributes["id"] != null)
                    {
                        indexNameIDRef_ = indexNameNode.Attributes["id"].Value;
                        IndexName ob = new IndexName(indexNameNode);
                        IDManager.SetID(indexNameIDRef_, ob);
                    }
                    else if (indexNameNode.Attributes["href"] != null)
                    {
                        indexNameIDRef_ = indexNameNode.Attributes["href"].Value;
                    }
                    else
                    {
                        indexName_ = new IndexName(indexNameNode);
                    }
                }
                else
                {
                    indexName_ = new IndexName(indexNameNode);
                }
            }


            XmlNodeList indexIdNodeList = xmlNode.SelectNodes("indexId");

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


            XmlNode indexSeriesNode = xmlNode.SelectSingleNode("indexSeries");

            if (indexSeriesNode != null)
            {
                if (indexSeriesNode.Attributes["href"] != null || indexSeriesNode.Attributes["id"] != null)
                {
                    if (indexSeriesNode.Attributes["id"] != null)
                    {
                        indexSeriesIDRef_ = indexSeriesNode.Attributes["id"].Value;
                        XsdTypePositiveInteger ob = new XsdTypePositiveInteger(indexSeriesNode);
                        IDManager.SetID(indexSeriesIDRef_, ob);
                    }
                    else if (indexSeriesNode.Attributes["href"] != null)
                    {
                        indexSeriesIDRef_ = indexSeriesNode.Attributes["href"].Value;
                    }
                    else
                    {
                        indexSeries_ = new XsdTypePositiveInteger(indexSeriesNode);
                    }
                }
                else
                {
                    indexSeries_ = new XsdTypePositiveInteger(indexSeriesNode);
                }
            }


            XmlNode indexAnnexVersionNode = xmlNode.SelectSingleNode("indexAnnexVersion");

            if (indexAnnexVersionNode != null)
            {
                if (indexAnnexVersionNode.Attributes["href"] != null || indexAnnexVersionNode.Attributes["id"] != null)
                {
                    if (indexAnnexVersionNode.Attributes["id"] != null)
                    {
                        indexAnnexVersionIDRef_ = indexAnnexVersionNode.Attributes["id"].Value;
                        XsdTypePositiveInteger ob = new XsdTypePositiveInteger(indexAnnexVersionNode);
                        IDManager.SetID(indexAnnexVersionIDRef_, ob);
                    }
                    else if (indexAnnexVersionNode.Attributes["href"] != null)
                    {
                        indexAnnexVersionIDRef_ = indexAnnexVersionNode.Attributes["href"].Value;
                    }
                    else
                    {
                        indexAnnexVersion_ = new XsdTypePositiveInteger(indexAnnexVersionNode);
                    }
                }
                else
                {
                    indexAnnexVersion_ = new XsdTypePositiveInteger(indexAnnexVersionNode);
                }
            }


            XmlNode indexAnnexDateNode = xmlNode.SelectSingleNode("indexAnnexDate");

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


            XmlNode indexAnnexSourceNode = xmlNode.SelectSingleNode("indexAnnexSource");

            if (indexAnnexSourceNode != null)
            {
                if (indexAnnexSourceNode.Attributes["href"] != null || indexAnnexSourceNode.Attributes["id"] != null)
                {
                    if (indexAnnexSourceNode.Attributes["id"] != null)
                    {
                        indexAnnexSourceIDRef_ = indexAnnexSourceNode.Attributes["id"].Value;
                        IndexAnnexSource ob = new IndexAnnexSource(indexAnnexSourceNode);
                        IDManager.SetID(indexAnnexSourceIDRef_, ob);
                    }
                    else if (indexAnnexSourceNode.Attributes["href"] != null)
                    {
                        indexAnnexSourceIDRef_ = indexAnnexSourceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        indexAnnexSource_ = new IndexAnnexSource(indexAnnexSourceNode);
                    }
                }
                else
                {
                    indexAnnexSource_ = new IndexAnnexSource(indexAnnexSourceNode);
                }
            }


            XmlNodeList excludedReferenceEntityNodeList = xmlNode.SelectNodes("excludedReferenceEntity");

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


            XmlNode trancheNode = xmlNode.SelectSingleNode("tranche");

            if (trancheNode != null)
            {
                if (trancheNode.Attributes["href"] != null || trancheNode.Attributes["id"] != null)
                {
                    if (trancheNode.Attributes["id"] != null)
                    {
                        trancheIDRef_ = trancheNode.Attributes["id"].Value;
                        Tranche ob = new Tranche(trancheNode);
                        IDManager.SetID(trancheIDRef_, ob);
                    }
                    else if (trancheNode.Attributes["href"] != null)
                    {
                        trancheIDRef_ = trancheNode.Attributes["href"].Value;
                    }
                    else
                    {
                        tranche_ = new Tranche(trancheNode);
                    }
                }
                else
                {
                    tranche_ = new Tranche(trancheNode);
                }
            }


            XmlNode settledEntityMatrixNode = xmlNode.SelectSingleNode("settledEntityMatrix");

            if (settledEntityMatrixNode != null)
            {
                if (settledEntityMatrixNode.Attributes["href"] != null || settledEntityMatrixNode.Attributes["id"] != null)
                {
                    if (settledEntityMatrixNode.Attributes["id"] != null)
                    {
                        settledEntityMatrixIDRef_ = settledEntityMatrixNode.Attributes["id"].Value;
                        SettledEntityMatrix ob = new SettledEntityMatrix(settledEntityMatrixNode);
                        IDManager.SetID(settledEntityMatrixIDRef_, ob);
                    }
                    else if (settledEntityMatrixNode.Attributes["href"] != null)
                    {
                        settledEntityMatrixIDRef_ = settledEntityMatrixNode.Attributes["href"].Value;
                    }
                    else
                    {
                        settledEntityMatrix_ = new SettledEntityMatrix(settledEntityMatrixNode);
                    }
                }
                else
                {
                    settledEntityMatrix_ = new SettledEntityMatrix(settledEntityMatrixNode);
                }
            }
        }
Пример #12
0
        public FxSpotRateSource(XmlNode xmlNode)
        {
            XmlNodeList primaryRateSourceNodeList = xmlNode.SelectNodes("primaryRateSource");

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

            foreach (XmlNode item in primaryRateSourceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        primaryRateSourceIDRef = item.Attributes["id"].Name;
                        InformationSource ob = InformationSource();
                        IDManager.SetID(primaryRateSourceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        primaryRateSourceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        primaryRateSource = new InformationSource(item);
                    }
                }
            }


            XmlNodeList secondaryRateSourceNodeList = xmlNode.SelectNodes("secondaryRateSource");

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

            foreach (XmlNode item in secondaryRateSourceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        secondaryRateSourceIDRef = item.Attributes["id"].Name;
                        InformationSource ob = InformationSource();
                        IDManager.SetID(secondaryRateSourceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        secondaryRateSourceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        secondaryRateSource = new InformationSource(item);
                    }
                }
            }


            XmlNodeList fixingTimeNodeList = xmlNode.SelectNodes("fixingTime");

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

            foreach (XmlNode item in fixingTimeNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        fixingTimeIDRef = item.Attributes["id"].Name;
                        BusinessCenterTime ob = BusinessCenterTime();
                        IDManager.SetID(fixingTimeIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        fixingTimeIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        fixingTime = new BusinessCenterTime(item);
                    }
                }
            }
        }
        public ResponseMessageHeader(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNodeList inReplyToNodeList = xmlNode.SelectNodes("inReplyTo");

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

            foreach (XmlNode item in inReplyToNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        inReplyToIDRef = item.Attributes["id"].Name;
                        MessageId ob = MessageId();
                        IDManager.SetID(inReplyToIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        inReplyToIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        inReplyTo = new MessageId(item);
                    }
                }
            }


            XmlNodeList sentByNodeList = xmlNode.SelectNodes("sentBy");

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

            foreach (XmlNode item in sentByNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        sentByIDRef = item.Attributes["id"].Name;
                        MessageAddress ob = MessageAddress();
                        IDManager.SetID(sentByIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        sentByIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        sentBy = new MessageAddress(item);
                    }
                }
            }


            XmlNodeList sendToNodeList = xmlNode.SelectNodes("sendTo");

            foreach (XmlNode item in sendToNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        sendToIDRef = item.Attributes["id"].Name;
                        List <MessageAddress> ob = new List <MessageAddress>();
                        ob.Add(new MessageAddress(item));
                        IDManager.SetID(sendToIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        sendToIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        sendTo.Add(new MessageAddress(item));
                    }
                }
            }


            XmlNodeList copyToNodeList = xmlNode.SelectNodes("copyTo");

            foreach (XmlNode item in copyToNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        copyToIDRef = item.Attributes["id"].Name;
                        List <MessageAddress> ob = new List <MessageAddress>();
                        ob.Add(new MessageAddress(item));
                        IDManager.SetID(copyToIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        copyToIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        copyTo.Add(new MessageAddress(item));
                    }
                }
            }


            XmlNodeList creationTimestampNodeList = xmlNode.SelectNodes("creationTimestamp");

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

            foreach (XmlNode item in creationTimestampNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        creationTimestampIDRef = item.Attributes["id"].Name;
                        XsdTypeDateTime ob = XsdTypeDateTime();
                        IDManager.SetID(creationTimestampIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        creationTimestampIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        creationTimestamp = new XsdTypeDateTime(item);
                    }
                }
            }


            XmlNodeList expiryTimestampNodeList = xmlNode.SelectNodes("expiryTimestamp");

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

            foreach (XmlNode item in expiryTimestampNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        expiryTimestampIDRef = item.Attributes["id"].Name;
                        XsdTypeDateTime ob = XsdTypeDateTime();
                        IDManager.SetID(expiryTimestampIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        expiryTimestampIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        expiryTimestamp = new XsdTypeDateTime(item);
                    }
                }
            }


            XmlNodeList implementationSpecificationNodeList = xmlNode.SelectNodes("implementationSpecification");

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

            foreach (XmlNode item in implementationSpecificationNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        implementationSpecificationIDRef = item.Attributes["id"].Name;
                        ImplementationSpecification ob = ImplementationSpecification();
                        IDManager.SetID(implementationSpecificationIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        implementationSpecificationIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        implementationSpecification = new ImplementationSpecification(item);
                    }
                }
            }


            XmlNodeList partyMessageInformationNodeList = xmlNode.SelectNodes("partyMessageInformation");

            foreach (XmlNode item in partyMessageInformationNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        partyMessageInformationIDRef = item.Attributes["id"].Name;
                        List <PartyMessageInformation> ob = new List <PartyMessageInformation>();
                        ob.Add(new PartyMessageInformation(item));
                        IDManager.SetID(partyMessageInformationIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        partyMessageInformationIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        partyMessageInformation.Add(new PartyMessageInformation(item));
                    }
                }
            }


            XmlNodeList SignatureNodeList = xmlNode.SelectNodes("Signature");

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

            foreach (XmlNode item in SignatureNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        SignatureIDRef = item.Attributes["id"].Name;
                        SignatureType ob = SignatureType();
                        IDManager.SetID(SignatureIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        SignatureIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        Signature = new SignatureType(item);
                    }
                }
            }
        }
Пример #14
0
        public DividendSwapOptionTransactionSupplement(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNodeList equityPremiumNodeList = xmlNode.SelectNodes("equityPremium");

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

            foreach (XmlNode item in equityPremiumNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        equityPremiumIDRef = item.Attributes["id"].Name;
                        EquityPremium ob = EquityPremium();
                        IDManager.SetID(equityPremiumIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        equityPremiumIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        equityPremium = new EquityPremium(item);
                    }
                }
            }


            XmlNodeList equityExerciseNodeList = xmlNode.SelectNodes("equityExercise");

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

            foreach (XmlNode item in equityExerciseNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        equityExerciseIDRef = item.Attributes["id"].Name;
                        EquityExerciseValuationSettlement ob = EquityExerciseValuationSettlement();
                        IDManager.SetID(equityExerciseIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        equityExerciseIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        equityExercise = new EquityExerciseValuationSettlement(item);
                    }
                }
            }


            XmlNodeList exchangeLookAlikeNodeList = xmlNode.SelectNodes("exchangeLookAlike");

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

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


            XmlNodeList methodOfAdjustmentNodeList = xmlNode.SelectNodes("methodOfAdjustment");

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

            foreach (XmlNode item in methodOfAdjustmentNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        methodOfAdjustmentIDRef = item.Attributes["id"].Name;
                        MethodOfAdjustmentEnum ob = MethodOfAdjustmentEnum();
                        IDManager.SetID(methodOfAdjustmentIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        methodOfAdjustmentIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        methodOfAdjustment = new MethodOfAdjustmentEnum(item);
                    }
                }
            }


            XmlNodeList optionEntitlementNodeList = xmlNode.SelectNodes("optionEntitlement");

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

            foreach (XmlNode item in optionEntitlementNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        optionEntitlementIDRef = item.Attributes["id"].Name;
                        PositiveDecimal ob = PositiveDecimal();
                        IDManager.SetID(optionEntitlementIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        optionEntitlementIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        optionEntitlement = new PositiveDecimal(item);
                    }
                }
            }


            XmlNodeList multiplierNodeList = xmlNode.SelectNodes("multiplier");

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

            foreach (XmlNode item in multiplierNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        multiplierIDRef = item.Attributes["id"].Name;
                        PositiveDecimal ob = PositiveDecimal();
                        IDManager.SetID(multiplierIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        multiplierIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        multiplier = new PositiveDecimal(item);
                    }
                }
            }


            XmlNodeList dividendSwapTransactionSupplementNodeList = xmlNode.SelectNodes("dividendSwapTransactionSupplement");

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

            foreach (XmlNode item in dividendSwapTransactionSupplementNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        dividendSwapTransactionSupplementIDRef = item.Attributes["id"].Name;
                        DividendSwapTransactionSupplement ob = DividendSwapTransactionSupplement();
                        IDManager.SetID(dividendSwapTransactionSupplementIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        dividendSwapTransactionSupplementIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        dividendSwapTransactionSupplement = new DividendSwapTransactionSupplement(item);
                    }
                }
            }
        }
        public FixedFixingDateInfo(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNode dateNode = xmlNode.SelectSingleNode("date");

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


            XmlNode autoCallFlagNode = xmlNode.SelectSingleNode("autoCallFlag");

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


            XmlNode autoCallFixingDateNode = xmlNode.SelectSingleNode("autoCallFixingDate");

            if (autoCallFixingDateNode != null)
            {
                if (autoCallFixingDateNode.Attributes["href"] != null || autoCallFixingDateNode.Attributes["id"] != null)
                {
                    if (autoCallFixingDateNode.Attributes["id"] != null)
                    {
                        autoCallFixingDateIDRef_ = autoCallFixingDateNode.Attributes["id"].Value;
                        XsdTypeDate ob = new XsdTypeDate(autoCallFixingDateNode);
                        IDManager.SetID(autoCallFixingDateIDRef_, ob);
                    }
                    else if (autoCallFixingDateNode.Attributes["href"] != null)
                    {
                        autoCallFixingDateIDRef_ = autoCallFixingDateNode.Attributes["href"].Value;
                    }
                    else
                    {
                        autoCallFixingDate_ = new XsdTypeDate(autoCallFixingDateNode);
                    }
                }
                else
                {
                    autoCallFixingDate_ = new XsdTypeDate(autoCallFixingDateNode);
                }
            }
        }
Пример #16
0
        public DirectionalLeg(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNodeList legIdentifierNodeList = xmlNode.SelectNodes("legIdentifier");

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


            XmlNode payerPartyReferenceNode = xmlNode.SelectSingleNode("payerPartyReference");

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


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

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


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

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


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

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


            XmlNode effectiveDateNode = xmlNode.SelectSingleNode("effectiveDate");

            if (effectiveDateNode != null)
            {
                if (effectiveDateNode.Attributes["href"] != null || effectiveDateNode.Attributes["id"] != null)
                {
                    if (effectiveDateNode.Attributes["id"] != null)
                    {
                        effectiveDateIDRef_ = effectiveDateNode.Attributes["id"].Value;
                        AdjustableOrRelativeDate ob = new AdjustableOrRelativeDate(effectiveDateNode);
                        IDManager.SetID(effectiveDateIDRef_, ob);
                    }
                    else if (effectiveDateNode.Attributes["href"] != null)
                    {
                        effectiveDateIDRef_ = effectiveDateNode.Attributes["href"].Value;
                    }
                    else
                    {
                        effectiveDate_ = new AdjustableOrRelativeDate(effectiveDateNode);
                    }
                }
                else
                {
                    effectiveDate_ = new AdjustableOrRelativeDate(effectiveDateNode);
                }
            }


            XmlNode terminationDateNode = xmlNode.SelectSingleNode("terminationDate");

            if (terminationDateNode != null)
            {
                if (terminationDateNode.Attributes["href"] != null || terminationDateNode.Attributes["id"] != null)
                {
                    if (terminationDateNode.Attributes["id"] != null)
                    {
                        terminationDateIDRef_ = terminationDateNode.Attributes["id"].Value;
                        AdjustableOrRelativeDate ob = new AdjustableOrRelativeDate(terminationDateNode);
                        IDManager.SetID(terminationDateIDRef_, ob);
                    }
                    else if (terminationDateNode.Attributes["href"] != null)
                    {
                        terminationDateIDRef_ = terminationDateNode.Attributes["href"].Value;
                    }
                    else
                    {
                        terminationDate_ = new AdjustableOrRelativeDate(terminationDateNode);
                    }
                }
                else
                {
                    terminationDate_ = new AdjustableOrRelativeDate(terminationDateNode);
                }
            }
        }
        public Instrument(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNode headerNode = xmlNode.SelectSingleNode("header");

            if (headerNode != null)
            {
                if (headerNode.Attributes["href"] != null || headerNode.Attributes["id"] != null)
                {
                    if (headerNode.Attributes["id"] != null)
                    {
                        headerIDRef_ = headerNode.Attributes["id"].Value;
                        Header ob = new Header(headerNode);
                        IDManager.SetID(headerIDRef_, ob);
                    }
                    else if (headerNode.Attributes["href"] != null)
                    {
                        headerIDRef_ = headerNode.Attributes["href"].Value;
                    }
                    else
                    {
                        header_ = new Header(headerNode);
                    }
                }
                else
                {
                    header_ = new Header(headerNode);
                }
            }


            XmlNode instPositionInfoNode = xmlNode.SelectSingleNode("instPositionInfo");

            if (instPositionInfoNode != null)
            {
                if (instPositionInfoNode.Attributes["href"] != null || instPositionInfoNode.Attributes["id"] != null)
                {
                    if (instPositionInfoNode.Attributes["id"] != null)
                    {
                        instPositionInfoIDRef_ = instPositionInfoNode.Attributes["id"].Value;
                        InstPositionInfo ob = new InstPositionInfo(instPositionInfoNode);
                        IDManager.SetID(instPositionInfoIDRef_, ob);
                    }
                    else if (instPositionInfoNode.Attributes["href"] != null)
                    {
                        instPositionInfoIDRef_ = instPositionInfoNode.Attributes["href"].Value;
                    }
                    else
                    {
                        instPositionInfo_ = new InstPositionInfo(instPositionInfoNode);
                    }
                }
                else
                {
                    instPositionInfo_ = new InstPositionInfo(instPositionInfoNode);
                }
            }


            XmlNode excel_interfaceNode = xmlNode.SelectSingleNode("excel_interface");

            if (excel_interfaceNode != null)
            {
                if (excel_interfaceNode.Attributes["href"] != null || excel_interfaceNode.Attributes["id"] != null)
                {
                    if (excel_interfaceNode.Attributes["id"] != null)
                    {
                        excel_interfaceIDRef_ = excel_interfaceNode.Attributes["id"].Value;
                        Excel_interface ob = new Excel_interface(excel_interfaceNode);
                        IDManager.SetID(excel_interfaceIDRef_, ob);
                    }
                    else if (excel_interfaceNode.Attributes["href"] != null)
                    {
                        excel_interfaceIDRef_ = excel_interfaceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        excel_interface_ = new Excel_interface(excel_interfaceNode);
                    }
                }
                else
                {
                    excel_interface_ = new Excel_interface(excel_interfaceNode);
                }
            }


            XmlNode instrumentInfoNode = xmlNode.SelectSingleNode("instrumentInfo");

            if (instrumentInfoNode != null)
            {
                if (instrumentInfoNode.Attributes["href"] != null || instrumentInfoNode.Attributes["id"] != null)
                {
                    if (instrumentInfoNode.Attributes["id"] != null)
                    {
                        instrumentInfoIDRef_ = instrumentInfoNode.Attributes["id"].Value;
                        InstrumentInfo ob = new InstrumentInfo(instrumentInfoNode);
                        IDManager.SetID(instrumentInfoIDRef_, ob);
                    }
                    else if (instrumentInfoNode.Attributes["href"] != null)
                    {
                        instrumentInfoIDRef_ = instrumentInfoNode.Attributes["href"].Value;
                    }
                    else
                    {
                        instrumentInfo_ = new InstrumentInfo(instrumentInfoNode);
                    }
                }
                else
                {
                    instrumentInfo_ = new InstrumentInfo(instrumentInfoNode);
                }
            }
        }
Пример #18
0
        public ContractualMatrix(XmlNode xmlNode)
        {
            XmlNodeList matrixTypeNodeList = xmlNode.SelectNodes("matrixType");

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

            foreach (XmlNode item in matrixTypeNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        matrixTypeIDRef = item.Attributes["id"].Name;
                        MatrixType ob = MatrixType();
                        IDManager.SetID(matrixTypeIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        matrixTypeIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        matrixType = new MatrixType(item);
                    }
                }
            }


            XmlNodeList publicationDateNodeList = xmlNode.SelectNodes("publicationDate");

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

            foreach (XmlNode item in publicationDateNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        publicationDateIDRef = item.Attributes["id"].Name;
                        XsdTypeDate ob = XsdTypeDate();
                        IDManager.SetID(publicationDateIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        publicationDateIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        publicationDate = new XsdTypeDate(item);
                    }
                }
            }


            XmlNodeList matrixTermNodeList = xmlNode.SelectNodes("matrixTerm");

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

            foreach (XmlNode item in matrixTermNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        matrixTermIDRef = item.Attributes["id"].Name;
                        MatrixTerm ob = MatrixTerm();
                        IDManager.SetID(matrixTermIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        matrixTermIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        matrixTerm = new MatrixTerm(item);
                    }
                }
            }
        }
Пример #19
0
        public UpperBarrierEventCal(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNodeList dateInformationNodeList = xmlNode.SelectNodes("dateInformation");

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


            XmlNodeList upperTriggerNodeList = xmlNode.SelectNodes("upperTrigger");

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


            XmlNode referenceCalculationInfoNode = xmlNode.SelectSingleNode("referenceCalculationInfo");

            if (referenceCalculationInfoNode != null)
            {
                if (referenceCalculationInfoNode.Attributes["href"] != null || referenceCalculationInfoNode.Attributes["id"] != null)
                {
                    if (referenceCalculationInfoNode.Attributes["id"] != null)
                    {
                        referenceCalculationInfoIDRef_ = referenceCalculationInfoNode.Attributes["id"].Value;
                        ReferenceCalculationInfo ob = new ReferenceCalculationInfo(referenceCalculationInfoNode);
                        IDManager.SetID(referenceCalculationInfoIDRef_, ob);
                    }
                    else if (referenceCalculationInfoNode.Attributes["href"] != null)
                    {
                        referenceCalculationInfoIDRef_ = referenceCalculationInfoNode.Attributes["href"].Value;
                    }
                    else
                    {
                        referenceCalculationInfo_ = new ReferenceCalculationInfo(referenceCalculationInfoNode);
                    }
                }
                else
                {
                    referenceCalculationInfo_ = new ReferenceCalculationInfo(referenceCalculationInfoNode);
                }
            }
        }
        public Excel_underlyingCalcID(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNode excel_typeNode = xmlNode.SelectSingleNode("excel_type");

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


            XmlNode calcIDNode = xmlNode.SelectSingleNode("calcID");

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


            XmlNode excel_choiceUnderlyingCalcIDNode = xmlNode.SelectSingleNode("excel_choiceUnderlyingCalcID");

            if (excel_choiceUnderlyingCalcIDNode != null)
            {
                if (excel_choiceUnderlyingCalcIDNode.Attributes["href"] != null || excel_choiceUnderlyingCalcIDNode.Attributes["id"] != null)
                {
                    if (excel_choiceUnderlyingCalcIDNode.Attributes["id"] != null)
                    {
                        excel_choiceUnderlyingCalcIDIDRef_ = excel_choiceUnderlyingCalcIDNode.Attributes["id"].Value;
                        Excel_choiceUnderlyingCalcID ob = new Excel_choiceUnderlyingCalcID(excel_choiceUnderlyingCalcIDNode);
                        IDManager.SetID(excel_choiceUnderlyingCalcIDIDRef_, ob);
                    }
                    else if (excel_choiceUnderlyingCalcIDNode.Attributes["href"] != null)
                    {
                        excel_choiceUnderlyingCalcIDIDRef_ = excel_choiceUnderlyingCalcIDNode.Attributes["href"].Value;
                    }
                    else
                    {
                        excel_choiceUnderlyingCalcID_ = new Excel_choiceUnderlyingCalcID(excel_choiceUnderlyingCalcIDNode);
                    }
                }
                else
                {
                    excel_choiceUnderlyingCalcID_ = new Excel_choiceUnderlyingCalcID(excel_choiceUnderlyingCalcIDNode);
                }
            }


            XmlNode excel_maximumUnderlyingCalcIDNode = xmlNode.SelectSingleNode("excel_maximumUnderlyingCalcID");

            if (excel_maximumUnderlyingCalcIDNode != null)
            {
                if (excel_maximumUnderlyingCalcIDNode.Attributes["href"] != null || excel_maximumUnderlyingCalcIDNode.Attributes["id"] != null)
                {
                    if (excel_maximumUnderlyingCalcIDNode.Attributes["id"] != null)
                    {
                        excel_maximumUnderlyingCalcIDIDRef_ = excel_maximumUnderlyingCalcIDNode.Attributes["id"].Value;
                        Excel_maximumUnderlyingCalcID ob = new Excel_maximumUnderlyingCalcID(excel_maximumUnderlyingCalcIDNode);
                        IDManager.SetID(excel_maximumUnderlyingCalcIDIDRef_, ob);
                    }
                    else if (excel_maximumUnderlyingCalcIDNode.Attributes["href"] != null)
                    {
                        excel_maximumUnderlyingCalcIDIDRef_ = excel_maximumUnderlyingCalcIDNode.Attributes["href"].Value;
                    }
                    else
                    {
                        excel_maximumUnderlyingCalcID_ = new Excel_maximumUnderlyingCalcID(excel_maximumUnderlyingCalcIDNode);
                    }
                }
                else
                {
                    excel_maximumUnderlyingCalcID_ = new Excel_maximumUnderlyingCalcID(excel_maximumUnderlyingCalcIDNode);
                }
            }


            XmlNode excel_minimumUnderlyingCalcIDNode = xmlNode.SelectSingleNode("excel_minimumUnderlyingCalcID");

            if (excel_minimumUnderlyingCalcIDNode != null)
            {
                if (excel_minimumUnderlyingCalcIDNode.Attributes["href"] != null || excel_minimumUnderlyingCalcIDNode.Attributes["id"] != null)
                {
                    if (excel_minimumUnderlyingCalcIDNode.Attributes["id"] != null)
                    {
                        excel_minimumUnderlyingCalcIDIDRef_ = excel_minimumUnderlyingCalcIDNode.Attributes["id"].Value;
                        Excel_minimumUnderlyingCalcID ob = new Excel_minimumUnderlyingCalcID(excel_minimumUnderlyingCalcIDNode);
                        IDManager.SetID(excel_minimumUnderlyingCalcIDIDRef_, ob);
                    }
                    else if (excel_minimumUnderlyingCalcIDNode.Attributes["href"] != null)
                    {
                        excel_minimumUnderlyingCalcIDIDRef_ = excel_minimumUnderlyingCalcIDNode.Attributes["href"].Value;
                    }
                    else
                    {
                        excel_minimumUnderlyingCalcID_ = new Excel_minimumUnderlyingCalcID(excel_minimumUnderlyingCalcIDNode);
                    }
                }
                else
                {
                    excel_minimumUnderlyingCalcID_ = new Excel_minimumUnderlyingCalcID(excel_minimumUnderlyingCalcIDNode);
                }
            }


            XmlNode excel_averageUnderlyingCalcIDNode = xmlNode.SelectSingleNode("excel_averageUnderlyingCalcID");

            if (excel_averageUnderlyingCalcIDNode != null)
            {
                if (excel_averageUnderlyingCalcIDNode.Attributes["href"] != null || excel_averageUnderlyingCalcIDNode.Attributes["id"] != null)
                {
                    if (excel_averageUnderlyingCalcIDNode.Attributes["id"] != null)
                    {
                        excel_averageUnderlyingCalcIDIDRef_ = excel_averageUnderlyingCalcIDNode.Attributes["id"].Value;
                        Excel_averageUnderlyingCalcID ob = new Excel_averageUnderlyingCalcID(excel_averageUnderlyingCalcIDNode);
                        IDManager.SetID(excel_averageUnderlyingCalcIDIDRef_, ob);
                    }
                    else if (excel_averageUnderlyingCalcIDNode.Attributes["href"] != null)
                    {
                        excel_averageUnderlyingCalcIDIDRef_ = excel_averageUnderlyingCalcIDNode.Attributes["href"].Value;
                    }
                    else
                    {
                        excel_averageUnderlyingCalcID_ = new Excel_averageUnderlyingCalcID(excel_averageUnderlyingCalcIDNode);
                    }
                }
                else
                {
                    excel_averageUnderlyingCalcID_ = new Excel_averageUnderlyingCalcID(excel_averageUnderlyingCalcIDNode);
                }
            }


            XmlNode excel_orderUnderlyingCalcIDNode = xmlNode.SelectSingleNode("excel_orderUnderlyingCalcID");

            if (excel_orderUnderlyingCalcIDNode != null)
            {
                if (excel_orderUnderlyingCalcIDNode.Attributes["href"] != null || excel_orderUnderlyingCalcIDNode.Attributes["id"] != null)
                {
                    if (excel_orderUnderlyingCalcIDNode.Attributes["id"] != null)
                    {
                        excel_orderUnderlyingCalcIDIDRef_ = excel_orderUnderlyingCalcIDNode.Attributes["id"].Value;
                        Excel_orderUnderlyingCalcID ob = new Excel_orderUnderlyingCalcID(excel_orderUnderlyingCalcIDNode);
                        IDManager.SetID(excel_orderUnderlyingCalcIDIDRef_, ob);
                    }
                    else if (excel_orderUnderlyingCalcIDNode.Attributes["href"] != null)
                    {
                        excel_orderUnderlyingCalcIDIDRef_ = excel_orderUnderlyingCalcIDNode.Attributes["href"].Value;
                    }
                    else
                    {
                        excel_orderUnderlyingCalcID_ = new Excel_orderUnderlyingCalcID(excel_orderUnderlyingCalcIDNode);
                    }
                }
                else
                {
                    excel_orderUnderlyingCalcID_ = new Excel_orderUnderlyingCalcID(excel_orderUnderlyingCalcIDNode);
                }
            }
        }
        public InterestLegResetDates(XmlNode xmlNode)
        {
            XmlNode calculationPeriodDatesReferenceNode = xmlNode.SelectSingleNode("calculationPeriodDatesReference");

            if (calculationPeriodDatesReferenceNode != null)
            {
                if (calculationPeriodDatesReferenceNode.Attributes["href"] != null || calculationPeriodDatesReferenceNode.Attributes["id"] != null)
                {
                    if (calculationPeriodDatesReferenceNode.Attributes["id"] != null)
                    {
                        calculationPeriodDatesReferenceIDRef_ = calculationPeriodDatesReferenceNode.Attributes["id"].Value;
                        InterestLegCalculationPeriodDatesReference ob = new InterestLegCalculationPeriodDatesReference(calculationPeriodDatesReferenceNode);
                        IDManager.SetID(calculationPeriodDatesReferenceIDRef_, ob);
                    }
                    else if (calculationPeriodDatesReferenceNode.Attributes["href"] != null)
                    {
                        calculationPeriodDatesReferenceIDRef_ = calculationPeriodDatesReferenceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        calculationPeriodDatesReference_ = new InterestLegCalculationPeriodDatesReference(calculationPeriodDatesReferenceNode);
                    }
                }
                else
                {
                    calculationPeriodDatesReference_ = new InterestLegCalculationPeriodDatesReference(calculationPeriodDatesReferenceNode);
                }
            }


            XmlNode resetRelativeToNode = xmlNode.SelectSingleNode("resetRelativeTo");

            if (resetRelativeToNode != null)
            {
                if (resetRelativeToNode.Attributes["href"] != null || resetRelativeToNode.Attributes["id"] != null)
                {
                    if (resetRelativeToNode.Attributes["id"] != null)
                    {
                        resetRelativeToIDRef_ = resetRelativeToNode.Attributes["id"].Value;
                        ResetRelativeToEnum ob = new ResetRelativeToEnum(resetRelativeToNode);
                        IDManager.SetID(resetRelativeToIDRef_, ob);
                    }
                    else if (resetRelativeToNode.Attributes["href"] != null)
                    {
                        resetRelativeToIDRef_ = resetRelativeToNode.Attributes["href"].Value;
                    }
                    else
                    {
                        resetRelativeTo_ = new ResetRelativeToEnum(resetRelativeToNode);
                    }
                }
                else
                {
                    resetRelativeTo_ = new ResetRelativeToEnum(resetRelativeToNode);
                }
            }


            XmlNode resetFrequencyNode = xmlNode.SelectSingleNode("resetFrequency");

            if (resetFrequencyNode != null)
            {
                if (resetFrequencyNode.Attributes["href"] != null || resetFrequencyNode.Attributes["id"] != null)
                {
                    if (resetFrequencyNode.Attributes["id"] != null)
                    {
                        resetFrequencyIDRef_ = resetFrequencyNode.Attributes["id"].Value;
                        ResetFrequency ob = new ResetFrequency(resetFrequencyNode);
                        IDManager.SetID(resetFrequencyIDRef_, ob);
                    }
                    else if (resetFrequencyNode.Attributes["href"] != null)
                    {
                        resetFrequencyIDRef_ = resetFrequencyNode.Attributes["href"].Value;
                    }
                    else
                    {
                        resetFrequency_ = new ResetFrequency(resetFrequencyNode);
                    }
                }
                else
                {
                    resetFrequency_ = new ResetFrequency(resetFrequencyNode);
                }
            }


            XmlNode initialFixingDateNode = xmlNode.SelectSingleNode("initialFixingDate");

            if (initialFixingDateNode != null)
            {
                if (initialFixingDateNode.Attributes["href"] != null || initialFixingDateNode.Attributes["id"] != null)
                {
                    if (initialFixingDateNode.Attributes["id"] != null)
                    {
                        initialFixingDateIDRef_ = initialFixingDateNode.Attributes["id"].Value;
                        RelativeDateOffset ob = new RelativeDateOffset(initialFixingDateNode);
                        IDManager.SetID(initialFixingDateIDRef_, ob);
                    }
                    else if (initialFixingDateNode.Attributes["href"] != null)
                    {
                        initialFixingDateIDRef_ = initialFixingDateNode.Attributes["href"].Value;
                    }
                    else
                    {
                        initialFixingDate_ = new RelativeDateOffset(initialFixingDateNode);
                    }
                }
                else
                {
                    initialFixingDate_ = new RelativeDateOffset(initialFixingDateNode);
                }
            }


            XmlNode fixingDatesNode = xmlNode.SelectSingleNode("fixingDates");

            if (fixingDatesNode != null)
            {
                if (fixingDatesNode.Attributes["href"] != null || fixingDatesNode.Attributes["id"] != null)
                {
                    if (fixingDatesNode.Attributes["id"] != null)
                    {
                        fixingDatesIDRef_ = fixingDatesNode.Attributes["id"].Value;
                        AdjustableDatesOrRelativeDateOffset ob = new AdjustableDatesOrRelativeDateOffset(fixingDatesNode);
                        IDManager.SetID(fixingDatesIDRef_, ob);
                    }
                    else if (fixingDatesNode.Attributes["href"] != null)
                    {
                        fixingDatesIDRef_ = fixingDatesNode.Attributes["href"].Value;
                    }
                    else
                    {
                        fixingDates_ = new AdjustableDatesOrRelativeDateOffset(fixingDatesNode);
                    }
                }
                else
                {
                    fixingDates_ = new AdjustableDatesOrRelativeDateOffset(fixingDatesNode);
                }
            }
        }
        public BasketReferenceInformation(XmlNode xmlNode)
        {
            XmlNodeList basketNameNodeList = xmlNode.SelectNodes("basketName");

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

            foreach (XmlNode item in basketNameNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        basketNameIDRef = item.Attributes["id"].Name;
                        BasketName ob = BasketName();
                        IDManager.SetID(basketNameIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        basketNameIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        basketName = new BasketName(item);
                    }
                }
            }


            XmlNodeList basketIdNodeList = xmlNode.SelectNodes("basketId");

            foreach (XmlNode item in basketIdNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        basketIdIDRef = item.Attributes["id"].Name;
                        List <BasketId> ob = new List <BasketId>();
                        ob.Add(new BasketId(item));
                        IDManager.SetID(basketIdIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        basketIdIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        basketId.Add(new BasketId(item));
                    }
                }
            }


            XmlNodeList referencePoolNodeList = xmlNode.SelectNodes("referencePool");

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

            foreach (XmlNode item in referencePoolNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        referencePoolIDRef = item.Attributes["id"].Name;
                        ReferencePool ob = ReferencePool();
                        IDManager.SetID(referencePoolIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        referencePoolIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        referencePool = new ReferencePool(item);
                    }
                }
            }


            XmlNodeList nthToDefaultNodeList = xmlNode.SelectNodes("nthToDefault");

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

            foreach (XmlNode item in nthToDefaultNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        nthToDefaultIDRef = item.Attributes["id"].Name;
                        XsdTypePositiveInteger ob = XsdTypePositiveInteger();
                        IDManager.SetID(nthToDefaultIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        nthToDefaultIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        nthToDefault = new XsdTypePositiveInteger(item);
                    }
                }
            }


            XmlNodeList mthToDefaultNodeList = xmlNode.SelectNodes("mthToDefault");

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

            foreach (XmlNode item in mthToDefaultNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        mthToDefaultIDRef = item.Attributes["id"].Name;
                        XsdTypePositiveInteger ob = XsdTypePositiveInteger();
                        IDManager.SetID(mthToDefaultIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        mthToDefaultIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        mthToDefault = new XsdTypePositiveInteger(item);
                    }
                }
            }


            XmlNodeList trancheNodeList = xmlNode.SelectNodes("tranche");

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

            foreach (XmlNode item in trancheNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        trancheIDRef = item.Attributes["id"].Name;
                        Tranche ob = Tranche();
                        IDManager.SetID(trancheIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        trancheIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        tranche = new Tranche(item);
                    }
                }
            }
        }
        public ReferenceCalculationInfo(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNode fixingInformationNode = xmlNode.SelectSingleNode("fixingInformation");

            if (fixingInformationNode != null)
            {
                if (fixingInformationNode.Attributes["href"] != null || fixingInformationNode.Attributes["id"] != null)
                {
                    if (fixingInformationNode.Attributes["id"] != null)
                    {
                        fixingInformationIDRef_ = fixingInformationNode.Attributes["id"].Value;
                        FixingInformation ob = new FixingInformation(fixingInformationNode);
                        IDManager.SetID(fixingInformationIDRef_, ob);
                    }
                    else if (fixingInformationNode.Attributes["href"] != null)
                    {
                        fixingInformationIDRef_ = fixingInformationNode.Attributes["href"].Value;
                    }
                    else
                    {
                        fixingInformation_ = new FixingInformation(fixingInformationNode);
                    }
                }
                else
                {
                    fixingInformation_ = new FixingInformation(fixingInformationNode);
                }
            }


            XmlNodeList referenceCalculationNodeList = xmlNode.SelectNodes("referenceCalculation");

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


            XmlNode operatorNDNode = xmlNode.SelectSingleNode("operatorND");

            if (operatorNDNode != null)
            {
                if (operatorNDNode.Attributes["href"] != null || operatorNDNode.Attributes["id"] != null)
                {
                    if (operatorNDNode.Attributes["id"] != null)
                    {
                        operatorNDIDRef_ = operatorNDNode.Attributes["id"].Value;
                        OperatorND ob = new OperatorND(operatorNDNode);
                        IDManager.SetID(operatorNDIDRef_, ob);
                    }
                    else if (operatorNDNode.Attributes["href"] != null)
                    {
                        operatorNDIDRef_ = operatorNDNode.Attributes["href"].Value;
                    }
                    else
                    {
                        operatorND_ = new OperatorND(operatorNDNode);
                    }
                }
                else
                {
                    operatorND_ = new OperatorND(operatorNDNode);
                }
            }


            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);
                }
            }


            XmlNode refVariable_referenceValueNode = xmlNode.SelectSingleNode("refVariable_referenceValue");

            if (refVariable_referenceValueNode != null)
            {
                if (refVariable_referenceValueNode.Attributes["href"] != null || refVariable_referenceValueNode.Attributes["id"] != null)
                {
                    if (refVariable_referenceValueNode.Attributes["id"] != null)
                    {
                        refVariable_referenceValueIDRef_ = refVariable_referenceValueNode.Attributes["id"].Value;
                        RefVariable_referenceValue ob = new RefVariable_referenceValue(refVariable_referenceValueNode);
                        IDManager.SetID(refVariable_referenceValueIDRef_, ob);
                    }
                    else if (refVariable_referenceValueNode.Attributes["href"] != null)
                    {
                        refVariable_referenceValueIDRef_ = refVariable_referenceValueNode.Attributes["href"].Value;
                    }
                    else
                    {
                        refVariable_referenceValue_ = new RefVariable_referenceValue(refVariable_referenceValueNode);
                    }
                }
                else
                {
                    refVariable_referenceValue_ = new RefVariable_referenceValue(refVariable_referenceValueNode);
                }
            }
        }
        public PricingDataPointCoordinate(XmlNode xmlNode)
        {
            XmlNodeList termNodeList = xmlNode.SelectNodes("term");

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

            foreach (XmlNode item in termNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        termIDRef = item.Attributes["id"].Name;
                        TimeDimension ob = TimeDimension();
                        IDManager.SetID(termIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        termIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        term = new TimeDimension(item);
                    }
                }
            }


            XmlNodeList expirationNodeList = xmlNode.SelectNodes("expiration");

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

            foreach (XmlNode item in expirationNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        expirationIDRef = item.Attributes["id"].Name;
                        TimeDimension ob = TimeDimension();
                        IDManager.SetID(expirationIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        expirationIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        expiration = new TimeDimension(item);
                    }
                }
            }


            XmlNodeList strikeNodeList = xmlNode.SelectNodes("strike");

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

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


            XmlNodeList genericNodeList = xmlNode.SelectNodes("generic");

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

            foreach (XmlNode item in genericNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        genericIDRef = item.Attributes["id"].Name;
                        GenericDimension ob = GenericDimension();
                        IDManager.SetID(genericIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        genericIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        generic = new GenericDimension(item);
                    }
                }
            }
        }
Пример #25
0
        public SplitSettlement(XmlNode xmlNode)
        {
            XmlNode splitSettlementAmountNode = xmlNode.SelectSingleNode("splitSettlementAmount");

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


            XmlNode beneficiaryBankNode = xmlNode.SelectSingleNode("beneficiaryBank");

            if (beneficiaryBankNode != null)
            {
                if (beneficiaryBankNode.Attributes["href"] != null || beneficiaryBankNode.Attributes["id"] != null)
                {
                    if (beneficiaryBankNode.Attributes["id"] != null)
                    {
                        beneficiaryBankIDRef_ = beneficiaryBankNode.Attributes["id"].Value;
                        Routing ob = new Routing(beneficiaryBankNode);
                        IDManager.SetID(beneficiaryBankIDRef_, ob);
                    }
                    else if (beneficiaryBankNode.Attributes["href"] != null)
                    {
                        beneficiaryBankIDRef_ = beneficiaryBankNode.Attributes["href"].Value;
                    }
                    else
                    {
                        beneficiaryBank_ = new Routing(beneficiaryBankNode);
                    }
                }
                else
                {
                    beneficiaryBank_ = new Routing(beneficiaryBankNode);
                }
            }


            XmlNode beneficiaryNode = xmlNode.SelectSingleNode("beneficiary");

            if (beneficiaryNode != null)
            {
                if (beneficiaryNode.Attributes["href"] != null || beneficiaryNode.Attributes["id"] != null)
                {
                    if (beneficiaryNode.Attributes["id"] != null)
                    {
                        beneficiaryIDRef_ = beneficiaryNode.Attributes["id"].Value;
                        Routing ob = new Routing(beneficiaryNode);
                        IDManager.SetID(beneficiaryIDRef_, ob);
                    }
                    else if (beneficiaryNode.Attributes["href"] != null)
                    {
                        beneficiaryIDRef_ = beneficiaryNode.Attributes["href"].Value;
                    }
                    else
                    {
                        beneficiary_ = new Routing(beneficiaryNode);
                    }
                }
                else
                {
                    beneficiary_ = new Routing(beneficiaryNode);
                }
            }
        }
Пример #26
0
        public IssueInformation(XmlNode xmlNode)
        {
            XmlNodeList productTypeNodeList = xmlNode.SelectNodes("productType");

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

            foreach (XmlNode item in productTypeNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        productTypeIDRef = item.Attributes["id"].Name;
                        XsdTypeToken ob = XsdTypeToken();
                        IDManager.SetID(productTypeIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        productTypeIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        productType = new XsdTypeToken(item);
                    }
                }
            }


            XmlNodeList instrumentIDNodeList = xmlNode.SelectNodes("instrumentID");

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

            foreach (XmlNode item in instrumentIDNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        instrumentIDIDRef = item.Attributes["id"].Name;
                        XsdTypeToken ob = XsdTypeToken();
                        IDManager.SetID(instrumentIDIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        instrumentIDIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        instrumentID = new XsdTypeToken(item);
                    }
                }
            }


            XmlNodeList notionalNodeList = xmlNode.SelectNodes("notional");

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

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


            XmlNodeList issueDateNodeList = xmlNode.SelectNodes("issueDate");

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

            foreach (XmlNode item in issueDateNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        issueDateIDRef = item.Attributes["id"].Name;
                        EventDate ob = EventDate();
                        IDManager.SetID(issueDateIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        issueDateIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        issueDate = new EventDate(item);
                    }
                }
            }


            XmlNodeList maturityDateNodeList = xmlNode.SelectNodes("maturityDate");

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

            foreach (XmlNode item in maturityDateNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        maturityDateIDRef = item.Attributes["id"].Name;
                        EventDate ob = EventDate();
                        IDManager.SetID(maturityDateIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        maturityDateIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        maturityDate = new EventDate(item);
                    }
                }
            }
        }
Пример #27
0
        public EquityDerivativeLongFormBase(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNode dividendConditionsNode = xmlNode.SelectSingleNode("dividendConditions");

            if (dividendConditionsNode != null)
            {
                if (dividendConditionsNode.Attributes["href"] != null || dividendConditionsNode.Attributes["id"] != null)
                {
                    if (dividendConditionsNode.Attributes["id"] != null)
                    {
                        dividendConditionsIDRef_ = dividendConditionsNode.Attributes["id"].Value;
                        DividendConditions ob = new DividendConditions(dividendConditionsNode);
                        IDManager.SetID(dividendConditionsIDRef_, ob);
                    }
                    else if (dividendConditionsNode.Attributes["href"] != null)
                    {
                        dividendConditionsIDRef_ = dividendConditionsNode.Attributes["href"].Value;
                    }
                    else
                    {
                        dividendConditions_ = new DividendConditions(dividendConditionsNode);
                    }
                }
                else
                {
                    dividendConditions_ = new DividendConditions(dividendConditionsNode);
                }
            }


            XmlNode methodOfAdjustmentNode = xmlNode.SelectSingleNode("methodOfAdjustment");

            if (methodOfAdjustmentNode != null)
            {
                if (methodOfAdjustmentNode.Attributes["href"] != null || methodOfAdjustmentNode.Attributes["id"] != null)
                {
                    if (methodOfAdjustmentNode.Attributes["id"] != null)
                    {
                        methodOfAdjustmentIDRef_ = methodOfAdjustmentNode.Attributes["id"].Value;
                        MethodOfAdjustmentEnum ob = new MethodOfAdjustmentEnum(methodOfAdjustmentNode);
                        IDManager.SetID(methodOfAdjustmentIDRef_, ob);
                    }
                    else if (methodOfAdjustmentNode.Attributes["href"] != null)
                    {
                        methodOfAdjustmentIDRef_ = methodOfAdjustmentNode.Attributes["href"].Value;
                    }
                    else
                    {
                        methodOfAdjustment_ = new MethodOfAdjustmentEnum(methodOfAdjustmentNode);
                    }
                }
                else
                {
                    methodOfAdjustment_ = new MethodOfAdjustmentEnum(methodOfAdjustmentNode);
                }
            }


            XmlNode extraordinaryEventsNode = xmlNode.SelectSingleNode("extraordinaryEvents");

            if (extraordinaryEventsNode != null)
            {
                if (extraordinaryEventsNode.Attributes["href"] != null || extraordinaryEventsNode.Attributes["id"] != null)
                {
                    if (extraordinaryEventsNode.Attributes["id"] != null)
                    {
                        extraordinaryEventsIDRef_ = extraordinaryEventsNode.Attributes["id"].Value;
                        ExtraordinaryEvents ob = new ExtraordinaryEvents(extraordinaryEventsNode);
                        IDManager.SetID(extraordinaryEventsIDRef_, ob);
                    }
                    else if (extraordinaryEventsNode.Attributes["href"] != null)
                    {
                        extraordinaryEventsIDRef_ = extraordinaryEventsNode.Attributes["href"].Value;
                    }
                    else
                    {
                        extraordinaryEvents_ = new ExtraordinaryEvents(extraordinaryEventsNode);
                    }
                }
                else
                {
                    extraordinaryEvents_ = new ExtraordinaryEvents(extraordinaryEventsNode);
                }
            }
        }
        public MaximumReferenceCal(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNode nthNode = xmlNode.SelectSingleNode("nth");

            if (nthNode != null)
            {
                if (nthNode.Attributes["href"] != null || nthNode.Attributes["id"] != null)
                {
                    if (nthNode.Attributes["id"] != null)
                    {
                        nthIDRef_ = nthNode.Attributes["id"].Value;
                        XsdTypeDouble ob = new XsdTypeDouble(nthNode);
                        IDManager.SetID(nthIDRef_, ob);
                    }
                    else if (nthNode.Attributes["href"] != null)
                    {
                        nthIDRef_ = nthNode.Attributes["href"].Value;
                    }
                    else
                    {
                        nth_ = new XsdTypeDouble(nthNode);
                    }
                }
                else
                {
                    nth_ = new XsdTypeDouble(nthNode);
                }
            }


            XmlNodeList selectedUnderNameNodeList = xmlNode.SelectNodes("selectedUnderName");

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


            XmlNode fixingDateInfoNode = xmlNode.SelectSingleNode("fixingDateInfo");

            if (fixingDateInfoNode != null)
            {
                if (fixingDateInfoNode.Attributes["href"] != null || fixingDateInfoNode.Attributes["id"] != null)
                {
                    if (fixingDateInfoNode.Attributes["id"] != null)
                    {
                        fixingDateInfoIDRef_ = fixingDateInfoNode.Attributes["id"].Value;
                        FixingDateInfo ob = new FixingDateInfo(fixingDateInfoNode);
                        IDManager.SetID(fixingDateInfoIDRef_, ob);
                    }
                    else if (fixingDateInfoNode.Attributes["href"] != null)
                    {
                        fixingDateInfoIDRef_ = fixingDateInfoNode.Attributes["href"].Value;
                    }
                    else
                    {
                        fixingDateInfo_ = new FixingDateInfo(fixingDateInfoNode);
                    }
                }
                else
                {
                    fixingDateInfo_ = new FixingDateInfo(fixingDateInfoNode);
                }
            }
        }
        public AtLeastEventCal(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNode numNode = xmlNode.SelectSingleNode("num");

            if (numNode != null)
            {
                if (numNode.Attributes["href"] != null || numNode.Attributes["id"] != null)
                {
                    if (numNode.Attributes["id"] != null)
                    {
                        numIDRef_ = numNode.Attributes["id"].Value;
                        XsdTypeInteger ob = new XsdTypeInteger(numNode);
                        IDManager.SetID(numIDRef_, ob);
                    }
                    else if (numNode.Attributes["href"] != null)
                    {
                        numIDRef_ = numNode.Attributes["href"].Value;
                    }
                    else
                    {
                        num_ = new XsdTypeInteger(numNode);
                    }
                }
                else
                {
                    num_ = new XsdTypeInteger(numNode);
                }
            }


            XmlNode eventCalculationListNode = xmlNode.SelectSingleNode("eventCalculationList");

            if (eventCalculationListNode != null)
            {
                if (eventCalculationListNode.Attributes["href"] != null || eventCalculationListNode.Attributes["id"] != null)
                {
                    if (eventCalculationListNode.Attributes["id"] != null)
                    {
                        eventCalculationListIDRef_ = eventCalculationListNode.Attributes["id"].Value;
                        EventCalculationList ob = new EventCalculationList(eventCalculationListNode);
                        IDManager.SetID(eventCalculationListIDRef_, ob);
                    }
                    else if (eventCalculationListNode.Attributes["href"] != null)
                    {
                        eventCalculationListIDRef_ = eventCalculationListNode.Attributes["href"].Value;
                    }
                    else
                    {
                        eventCalculationList_ = new EventCalculationList(eventCalculationListNode);
                    }
                }
                else
                {
                    eventCalculationList_ = new EventCalculationList(eventCalculationListNode);
                }
            }


            XmlNode complementNode = xmlNode.SelectSingleNode("complement");

            if (complementNode != null)
            {
                if (complementNode.Attributes["href"] != null || complementNode.Attributes["id"] != null)
                {
                    if (complementNode.Attributes["id"] != null)
                    {
                        complementIDRef_ = complementNode.Attributes["id"].Value;
                        XsdTypeBoolean ob = new XsdTypeBoolean(complementNode);
                        IDManager.SetID(complementIDRef_, ob);
                    }
                    else if (complementNode.Attributes["href"] != null)
                    {
                        complementIDRef_ = complementNode.Attributes["href"].Value;
                    }
                    else
                    {
                        complement_ = new XsdTypeBoolean(complementNode);
                    }
                }
                else
                {
                    complement_ = new XsdTypeBoolean(complementNode);
                }
            }
        }
        public Excel_swapInfo(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNode tradeDateNode = xmlNode.SelectSingleNode("tradeDate");

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


            XmlNode effectiveDateNode = xmlNode.SelectSingleNode("effectiveDate");

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


            XmlNode maturityDateNode = xmlNode.SelectSingleNode("maturityDate");

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


            XmlNode notionalNode = xmlNode.SelectSingleNode("notional");

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


            XmlNode currencyNode = xmlNode.SelectSingleNode("currency");

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


            XmlNode premiumNode = xmlNode.SelectSingleNode("premium");

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


            XmlNode vba_descriptionNode = xmlNode.SelectSingleNode("vba_description");

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