public ReferenceInformation(XmlNode 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); } } XmlNodeList referenceObligationNodeList = xmlNode.SelectNodes("referenceObligation"); if (referenceObligationNodeList != null) { this.referenceObligation_ = new List<ReferenceObligation>(); foreach (XmlNode item in referenceObligationNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] != null) { if (item.Attributes["id"] != null) { referenceObligationIDRef_ = item.Attributes["id"].Value; referenceObligation_.Add(new ReferenceObligation(item)); IDManager.SetID(referenceObligationIDRef_, referenceObligation_[referenceObligation_.Count - 1 ]); } else if (item.Attributes["href"] != null) { referenceObligationIDRef_ = item.Attributes["href"].Value; } else { referenceObligation_.Add(new ReferenceObligation(item)); } } else { referenceObligation_.Add(new ReferenceObligation(item)); } } } XmlNode noReferenceObligationNode = xmlNode.SelectSingleNode("noReferenceObligation"); if (noReferenceObligationNode != null) { if (noReferenceObligationNode.Attributes["href"] != null || noReferenceObligationNode.Attributes["id"] != null) { if (noReferenceObligationNode.Attributes["id"] != null) { noReferenceObligationIDRef_ = noReferenceObligationNode.Attributes["id"].Value; XsdTypeBoolean ob = new XsdTypeBoolean(noReferenceObligationNode); IDManager.SetID(noReferenceObligationIDRef_, ob); } else if (noReferenceObligationNode.Attributes["href"] != null) { noReferenceObligationIDRef_ = noReferenceObligationNode.Attributes["href"].Value; } else { noReferenceObligation_ = new XsdTypeBoolean(noReferenceObligationNode); } } else { noReferenceObligation_ = new XsdTypeBoolean(noReferenceObligationNode); } } XmlNode unknownReferenceObligationNode = xmlNode.SelectSingleNode("unknownReferenceObligation"); if (unknownReferenceObligationNode != null) { if (unknownReferenceObligationNode.Attributes["href"] != null || unknownReferenceObligationNode.Attributes["id"] != null) { if (unknownReferenceObligationNode.Attributes["id"] != null) { unknownReferenceObligationIDRef_ = unknownReferenceObligationNode.Attributes["id"].Value; XsdTypeBoolean ob = new XsdTypeBoolean(unknownReferenceObligationNode); IDManager.SetID(unknownReferenceObligationIDRef_, ob); } else if (unknownReferenceObligationNode.Attributes["href"] != null) { unknownReferenceObligationIDRef_ = unknownReferenceObligationNode.Attributes["href"].Value; } else { unknownReferenceObligation_ = new XsdTypeBoolean(unknownReferenceObligationNode); } } else { unknownReferenceObligation_ = new XsdTypeBoolean(unknownReferenceObligationNode); } } XmlNode allGuaranteesNode = xmlNode.SelectSingleNode("allGuarantees"); if (allGuaranteesNode != null) { if (allGuaranteesNode.Attributes["href"] != null || allGuaranteesNode.Attributes["id"] != null) { if (allGuaranteesNode.Attributes["id"] != null) { allGuaranteesIDRef_ = allGuaranteesNode.Attributes["id"].Value; XsdTypeBoolean ob = new XsdTypeBoolean(allGuaranteesNode); IDManager.SetID(allGuaranteesIDRef_, ob); } else if (allGuaranteesNode.Attributes["href"] != null) { allGuaranteesIDRef_ = allGuaranteesNode.Attributes["href"].Value; } else { allGuarantees_ = new XsdTypeBoolean(allGuaranteesNode); } } else { allGuarantees_ = new XsdTypeBoolean(allGuaranteesNode); } } XmlNode referencePriceNode = xmlNode.SelectSingleNode("referencePrice"); if (referencePriceNode != null) { if (referencePriceNode.Attributes["href"] != null || referencePriceNode.Attributes["id"] != null) { if (referencePriceNode.Attributes["id"] != null) { referencePriceIDRef_ = referencePriceNode.Attributes["id"].Value; XsdTypeDecimal ob = new XsdTypeDecimal(referencePriceNode); IDManager.SetID(referencePriceIDRef_, ob); } else if (referencePriceNode.Attributes["href"] != null) { referencePriceIDRef_ = referencePriceNode.Attributes["href"].Value; } else { referencePrice_ = new XsdTypeDecimal(referencePriceNode); } } else { referencePrice_ = new XsdTypeDecimal(referencePriceNode); } } XmlNode referencePolicyNode = xmlNode.SelectSingleNode("referencePolicy"); if (referencePolicyNode != null) { if (referencePolicyNode.Attributes["href"] != null || referencePolicyNode.Attributes["id"] != null) { if (referencePolicyNode.Attributes["id"] != null) { referencePolicyIDRef_ = referencePolicyNode.Attributes["id"].Value; XsdTypeBoolean ob = new XsdTypeBoolean(referencePolicyNode); IDManager.SetID(referencePolicyIDRef_, ob); } else if (referencePolicyNode.Attributes["href"] != null) { referencePolicyIDRef_ = referencePolicyNode.Attributes["href"].Value; } else { referencePolicy_ = new XsdTypeBoolean(referencePolicyNode); } } else { referencePolicy_ = new XsdTypeBoolean(referencePolicyNode); } } XmlNode securedListNode = xmlNode.SelectSingleNode("securedList"); if (securedListNode != null) { if (securedListNode.Attributes["href"] != null || securedListNode.Attributes["id"] != null) { if (securedListNode.Attributes["id"] != null) { securedListIDRef_ = securedListNode.Attributes["id"].Value; XsdTypeBoolean ob = new XsdTypeBoolean(securedListNode); IDManager.SetID(securedListIDRef_, ob); } else if (securedListNode.Attributes["href"] != null) { securedListIDRef_ = securedListNode.Attributes["href"].Value; } else { securedList_ = new XsdTypeBoolean(securedListNode); } } else { securedList_ = new XsdTypeBoolean(securedListNode); } } }
public Loan(XmlNode xmlNode) : base(xmlNode) { XmlNodeList borrowerNodeList = xmlNode.SelectNodes("borrower"); if (borrowerNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in borrowerNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { borrowerIDRef = item.Attributes["id"].Name; LegalEntity ob = LegalEntity(); IDManager.SetID(borrowerIDRef, ob); } else if (item.Attributes.ToString() == "href") { borrowerIDRef = item.Attributes["href"].Name; } else { borrower = new LegalEntity(item); } } } XmlNodeList borrowerReferenceNodeList = xmlNode.SelectNodes("borrowerReference"); if (borrowerReferenceNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in borrowerReferenceNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { borrowerReferenceIDRef = item.Attributes["id"].Name; LegalEntityReference ob = LegalEntityReference(); IDManager.SetID(borrowerReferenceIDRef, ob); } else if (item.Attributes.ToString() == "href") { borrowerReferenceIDRef = item.Attributes["href"].Name; } else { borrowerReference = new LegalEntityReference(item); } } } XmlNodeList lienNodeList = xmlNode.SelectNodes("lien"); if (lienNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in lienNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { lienIDRef = item.Attributes["id"].Name; Lien ob = Lien(); IDManager.SetID(lienIDRef, ob); } else if (item.Attributes.ToString() == "href") { lienIDRef = item.Attributes["href"].Name; } else { lien = new Lien(item); } } } XmlNodeList facilityTypeNodeList = xmlNode.SelectNodes("facilityType"); if (facilityTypeNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in facilityTypeNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { facilityTypeIDRef = item.Attributes["id"].Name; FacilityType ob = FacilityType(); IDManager.SetID(facilityTypeIDRef, ob); } else if (item.Attributes.ToString() == "href") { facilityTypeIDRef = item.Attributes["href"].Name; } else { facilityType = new FacilityType(item); } } } XmlNodeList maturityNodeList = xmlNode.SelectNodes("maturity"); if (maturityNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in maturityNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { maturityIDRef = item.Attributes["id"].Name; XsdTypeDate ob = XsdTypeDate(); IDManager.SetID(maturityIDRef, ob); } else if (item.Attributes.ToString() == "href") { maturityIDRef = item.Attributes["href"].Name; } else { maturity = new XsdTypeDate(item); } } } XmlNodeList creditAgreementDateNodeList = xmlNode.SelectNodes("creditAgreementDate"); if (creditAgreementDateNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in creditAgreementDateNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { creditAgreementDateIDRef = item.Attributes["id"].Name; XsdTypeDate ob = XsdTypeDate(); IDManager.SetID(creditAgreementDateIDRef, ob); } else if (item.Attributes.ToString() == "href") { creditAgreementDateIDRef = item.Attributes["href"].Name; } else { creditAgreementDate = new XsdTypeDate(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; UnderlyingAssetTranche ob = UnderlyingAssetTranche(); IDManager.SetID(trancheIDRef, ob); } else if (item.Attributes.ToString() == "href") { trancheIDRef = item.Attributes["href"].Name; } else { tranche = new UnderlyingAssetTranche(item); } } } }
public TradeUnderlyer2(XmlNode xmlNode) { XmlNodeList floatingRateNodeList = xmlNode.SelectNodes("floatingRate"); if (floatingRateNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in floatingRateNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { floatingRateIDRef = item.Attributes["id"].Name; FloatingRate ob = FloatingRate(); IDManager.SetID(floatingRateIDRef, ob); } else if (item.Attributes.ToString() == "href") { floatingRateIDRef = item.Attributes["href"].Name; } else { floatingRate = new FloatingRate(item); } } } XmlNodeList fixedRateNodeList = xmlNode.SelectNodes("fixedRate"); if (fixedRateNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in fixedRateNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { fixedRateIDRef = item.Attributes["id"].Name; Schedule ob = Schedule(); IDManager.SetID(fixedRateIDRef, ob); } else if (item.Attributes.ToString() == "href") { fixedRateIDRef = item.Attributes["href"].Name; } else { fixedRate = new Schedule(item); } } } XmlNodeList underlyingAssetNodeList = xmlNode.SelectNodes("underlyingAsset"); if (underlyingAssetNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in underlyingAssetNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { underlyingAssetIDRef = item.Attributes["id"].Name; Asset ob = Asset(); IDManager.SetID(underlyingAssetIDRef, ob); } else if (item.Attributes.ToString() == "href") { underlyingAssetIDRef = item.Attributes["href"].Name; } else { underlyingAsset = new Asset(item); } } } XmlNodeList basketNodeList = xmlNode.SelectNodes("basket"); if (basketNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in basketNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { basketIDRef = item.Attributes["id"].Name; Basket ob = Basket(); IDManager.SetID(basketIDRef, ob); } else if (item.Attributes.ToString() == "href") { basketIDRef = item.Attributes["href"].Name; } else { basket = new Basket(item); } } } XmlNodeList bondNodeList = xmlNode.SelectNodes("bond"); if (bondNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in bondNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { bondIDRef = item.Attributes["id"].Name; Bond ob = Bond(); IDManager.SetID(bondIDRef, ob); } else if (item.Attributes.ToString() == "href") { bondIDRef = item.Attributes["href"].Name; } else { bond = new Bond(item); } } } XmlNodeList cashNodeList = xmlNode.SelectNodes("cash"); if (cashNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in cashNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { cashIDRef = item.Attributes["id"].Name; Cash ob = Cash(); IDManager.SetID(cashIDRef, ob); } else if (item.Attributes.ToString() == "href") { cashIDRef = item.Attributes["href"].Name; } else { cash = new Cash(item); } } } XmlNodeList commodityNodeList = xmlNode.SelectNodes("commodity"); if (commodityNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in commodityNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { commodityIDRef = item.Attributes["id"].Name; Commodity ob = Commodity(); IDManager.SetID(commodityIDRef, ob); } else if (item.Attributes.ToString() == "href") { commodityIDRef = item.Attributes["href"].Name; } else { commodity = new Commodity(item); } } } XmlNodeList convertibleBondNodeList = xmlNode.SelectNodes("convertibleBond"); if (convertibleBondNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in convertibleBondNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { convertibleBondIDRef = item.Attributes["id"].Name; ConvertibleBond ob = ConvertibleBond(); IDManager.SetID(convertibleBondIDRef, ob); } else if (item.Attributes.ToString() == "href") { convertibleBondIDRef = item.Attributes["href"].Name; } else { convertibleBond = new ConvertibleBond(item); } } } XmlNodeList equityNodeList = xmlNode.SelectNodes("equity"); if (equityNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in equityNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { equityIDRef = item.Attributes["id"].Name; EquityAsset ob = EquityAsset(); IDManager.SetID(equityIDRef, ob); } else if (item.Attributes.ToString() == "href") { equityIDRef = item.Attributes["href"].Name; } else { equity = new EquityAsset(item); } } } XmlNodeList exchangeTradedFundNodeList = xmlNode.SelectNodes("exchangeTradedFund"); if (exchangeTradedFundNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in exchangeTradedFundNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { exchangeTradedFundIDRef = item.Attributes["id"].Name; ExchangeTradedFund ob = ExchangeTradedFund(); IDManager.SetID(exchangeTradedFundIDRef, ob); } else if (item.Attributes.ToString() == "href") { exchangeTradedFundIDRef = item.Attributes["href"].Name; } else { exchangeTradedFund = new ExchangeTradedFund(item); } } } XmlNodeList futureNodeList = xmlNode.SelectNodes("future"); if (futureNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in futureNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { futureIDRef = item.Attributes["id"].Name; Future ob = Future(); IDManager.SetID(futureIDRef, ob); } else if (item.Attributes.ToString() == "href") { futureIDRef = item.Attributes["href"].Name; } else { future = new Future(item); } } } XmlNodeList indexNodeList = xmlNode.SelectNodes("index"); if (indexNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in indexNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { indexIDRef = item.Attributes["id"].Name; Index ob = Index(); IDManager.SetID(indexIDRef, ob); } else if (item.Attributes.ToString() == "href") { indexIDRef = item.Attributes["href"].Name; } else { index = new Index(item); } } } XmlNodeList loanNodeList = xmlNode.SelectNodes("loan"); if (loanNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in loanNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { loanIDRef = item.Attributes["id"].Name; Loan ob = Loan(); IDManager.SetID(loanIDRef, ob); } else if (item.Attributes.ToString() == "href") { loanIDRef = item.Attributes["href"].Name; } else { loan = new Loan(item); } } } XmlNodeList mortgageNodeList = xmlNode.SelectNodes("mortgage"); if (mortgageNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in mortgageNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { mortgageIDRef = item.Attributes["id"].Name; Mortgage ob = Mortgage(); IDManager.SetID(mortgageIDRef, ob); } else if (item.Attributes.ToString() == "href") { mortgageIDRef = item.Attributes["href"].Name; } else { mortgage = new Mortgage(item); } } } XmlNodeList mutualFundNodeList = xmlNode.SelectNodes("mutualFund"); if (mutualFundNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in mutualFundNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { mutualFundIDRef = item.Attributes["id"].Name; MutualFund ob = MutualFund(); IDManager.SetID(mutualFundIDRef, ob); } else if (item.Attributes.ToString() == "href") { mutualFundIDRef = item.Attributes["href"].Name; } else { mutualFund = new MutualFund(item); } } } XmlNodeList quotedCurrencyPairNodeList = xmlNode.SelectNodes("quotedCurrencyPair"); if (quotedCurrencyPairNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in quotedCurrencyPairNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { quotedCurrencyPairIDRef = item.Attributes["id"].Name; QuotedCurrencyPair ob = QuotedCurrencyPair(); IDManager.SetID(quotedCurrencyPairIDRef, ob); } else if (item.Attributes.ToString() == "href") { quotedCurrencyPairIDRef = item.Attributes["href"].Name; } else { quotedCurrencyPair = new QuotedCurrencyPair(item); } } } XmlNodeList referenceEntityNodeList = xmlNode.SelectNodes("referenceEntity"); if (referenceEntityNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in referenceEntityNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { referenceEntityIDRef = item.Attributes["id"].Name; LegalEntity ob = LegalEntity(); IDManager.SetID(referenceEntityIDRef, ob); } else if (item.Attributes.ToString() == "href") { referenceEntityIDRef = item.Attributes["href"].Name; } else { referenceEntity = new LegalEntity(item); } } } XmlNodeList payerPartyReferenceNodeList = xmlNode.SelectNodes("payerPartyReference"); if (payerPartyReferenceNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in payerPartyReferenceNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { payerPartyReferenceIDRef = item.Attributes["id"].Name; PartyReference ob = PartyReference(); IDManager.SetID(payerPartyReferenceIDRef, ob); } else if (item.Attributes.ToString() == "href") { payerPartyReferenceIDRef = item.Attributes["href"].Name; } else { payerPartyReference = new PartyReference(item); } } } XmlNodeList payerAccountReferenceNodeList = xmlNode.SelectNodes("payerAccountReference"); if (payerAccountReferenceNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in payerAccountReferenceNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { payerAccountReferenceIDRef = item.Attributes["id"].Name; AccountReference ob = AccountReference(); IDManager.SetID(payerAccountReferenceIDRef, ob); } else if (item.Attributes.ToString() == "href") { payerAccountReferenceIDRef = item.Attributes["href"].Name; } else { payerAccountReference = new AccountReference(item); } } } XmlNodeList receiverPartyReferenceNodeList = xmlNode.SelectNodes("receiverPartyReference"); if (receiverPartyReferenceNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in receiverPartyReferenceNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { receiverPartyReferenceIDRef = item.Attributes["id"].Name; PartyReference ob = PartyReference(); IDManager.SetID(receiverPartyReferenceIDRef, ob); } else if (item.Attributes.ToString() == "href") { receiverPartyReferenceIDRef = item.Attributes["href"].Name; } else { receiverPartyReference = new PartyReference(item); } } } XmlNodeList receiverAccountReferenceNodeList = xmlNode.SelectNodes("receiverAccountReference"); if (receiverAccountReferenceNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in receiverAccountReferenceNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { receiverAccountReferenceIDRef = item.Attributes["id"].Name; AccountReference ob = AccountReference(); IDManager.SetID(receiverAccountReferenceIDRef, ob); } else if (item.Attributes.ToString() == "href") { receiverAccountReferenceIDRef = item.Attributes["href"].Name; } else { receiverAccountReference = new AccountReference(item); } } } }
public TradeUnderlyer2(XmlNode xmlNode) { XmlNode floatingRateNode = xmlNode.SelectSingleNode("floatingRate"); if (floatingRateNode != null) { if (floatingRateNode.Attributes["href"] != null || floatingRateNode.Attributes["id"] != null) { if (floatingRateNode.Attributes["id"] != null) { floatingRateIDRef_ = floatingRateNode.Attributes["id"].Value; FloatingRate ob = new FloatingRate(floatingRateNode); IDManager.SetID(floatingRateIDRef_, ob); } else if (floatingRateNode.Attributes["href"] != null) { floatingRateIDRef_ = floatingRateNode.Attributes["href"].Value; } else { floatingRate_ = new FloatingRate(floatingRateNode); } } else { floatingRate_ = new FloatingRate(floatingRateNode); } } XmlNode fixedRateNode = xmlNode.SelectSingleNode("fixedRate"); if (fixedRateNode != null) { if (fixedRateNode.Attributes["href"] != null || fixedRateNode.Attributes["id"] != null) { if (fixedRateNode.Attributes["id"] != null) { fixedRateIDRef_ = fixedRateNode.Attributes["id"].Value; Schedule ob = new Schedule(fixedRateNode); IDManager.SetID(fixedRateIDRef_, ob); } else if (fixedRateNode.Attributes["href"] != null) { fixedRateIDRef_ = fixedRateNode.Attributes["href"].Value; } else { fixedRate_ = new Schedule(fixedRateNode); } } else { fixedRate_ = new Schedule(fixedRateNode); } } XmlNode underlyingAssetNode = xmlNode.SelectSingleNode("underlyingAsset"); if (underlyingAssetNode != null) { if (underlyingAssetNode.Attributes["href"] != null || underlyingAssetNode.Attributes["id"] != null) { if (underlyingAssetNode.Attributes["id"] != null) { underlyingAssetIDRef_ = underlyingAssetNode.Attributes["id"].Value; Asset ob = new Asset(underlyingAssetNode); IDManager.SetID(underlyingAssetIDRef_, ob); } else if (underlyingAssetNode.Attributes["href"] != null) { underlyingAssetIDRef_ = underlyingAssetNode.Attributes["href"].Value; } else { underlyingAsset_ = new Asset(underlyingAssetNode); } } else { underlyingAsset_ = new Asset(underlyingAssetNode); } } XmlNode basketNode = xmlNode.SelectSingleNode("basket"); if (basketNode != null) { if (basketNode.Attributes["href"] != null || basketNode.Attributes["id"] != null) { if (basketNode.Attributes["id"] != null) { basketIDRef_ = basketNode.Attributes["id"].Value; Basket ob = new Basket(basketNode); IDManager.SetID(basketIDRef_, ob); } else if (basketNode.Attributes["href"] != null) { basketIDRef_ = basketNode.Attributes["href"].Value; } else { basket_ = new Basket(basketNode); } } else { basket_ = new Basket(basketNode); } } XmlNode bondNode = xmlNode.SelectSingleNode("bond"); if (bondNode != null) { if (bondNode.Attributes["href"] != null || bondNode.Attributes["id"] != null) { if (bondNode.Attributes["id"] != null) { bondIDRef_ = bondNode.Attributes["id"].Value; Bond ob = new Bond(bondNode); IDManager.SetID(bondIDRef_, ob); } else if (bondNode.Attributes["href"] != null) { bondIDRef_ = bondNode.Attributes["href"].Value; } else { bond_ = new Bond(bondNode); } } else { bond_ = new Bond(bondNode); } } XmlNode cashNode = xmlNode.SelectSingleNode("cash"); if (cashNode != null) { if (cashNode.Attributes["href"] != null || cashNode.Attributes["id"] != null) { if (cashNode.Attributes["id"] != null) { cashIDRef_ = cashNode.Attributes["id"].Value; Cash ob = new Cash(cashNode); IDManager.SetID(cashIDRef_, ob); } else if (cashNode.Attributes["href"] != null) { cashIDRef_ = cashNode.Attributes["href"].Value; } else { cash_ = new Cash(cashNode); } } else { cash_ = new Cash(cashNode); } } XmlNode commodityNode = xmlNode.SelectSingleNode("commodity"); if (commodityNode != null) { if (commodityNode.Attributes["href"] != null || commodityNode.Attributes["id"] != null) { if (commodityNode.Attributes["id"] != null) { commodityIDRef_ = commodityNode.Attributes["id"].Value; Commodity ob = new Commodity(commodityNode); IDManager.SetID(commodityIDRef_, ob); } else if (commodityNode.Attributes["href"] != null) { commodityIDRef_ = commodityNode.Attributes["href"].Value; } else { commodity_ = new Commodity(commodityNode); } } else { commodity_ = new Commodity(commodityNode); } } XmlNode convertibleBondNode = xmlNode.SelectSingleNode("convertibleBond"); if (convertibleBondNode != null) { if (convertibleBondNode.Attributes["href"] != null || convertibleBondNode.Attributes["id"] != null) { if (convertibleBondNode.Attributes["id"] != null) { convertibleBondIDRef_ = convertibleBondNode.Attributes["id"].Value; ConvertibleBond ob = new ConvertibleBond(convertibleBondNode); IDManager.SetID(convertibleBondIDRef_, ob); } else if (convertibleBondNode.Attributes["href"] != null) { convertibleBondIDRef_ = convertibleBondNode.Attributes["href"].Value; } else { convertibleBond_ = new ConvertibleBond(convertibleBondNode); } } else { convertibleBond_ = new ConvertibleBond(convertibleBondNode); } } XmlNode equityNode = xmlNode.SelectSingleNode("equity"); if (equityNode != null) { if (equityNode.Attributes["href"] != null || equityNode.Attributes["id"] != null) { if (equityNode.Attributes["id"] != null) { equityIDRef_ = equityNode.Attributes["id"].Value; EquityAsset ob = new EquityAsset(equityNode); IDManager.SetID(equityIDRef_, ob); } else if (equityNode.Attributes["href"] != null) { equityIDRef_ = equityNode.Attributes["href"].Value; } else { equity_ = new EquityAsset(equityNode); } } else { equity_ = new EquityAsset(equityNode); } } XmlNode exchangeTradedFundNode = xmlNode.SelectSingleNode("exchangeTradedFund"); if (exchangeTradedFundNode != null) { if (exchangeTradedFundNode.Attributes["href"] != null || exchangeTradedFundNode.Attributes["id"] != null) { if (exchangeTradedFundNode.Attributes["id"] != null) { exchangeTradedFundIDRef_ = exchangeTradedFundNode.Attributes["id"].Value; ExchangeTradedFund ob = new ExchangeTradedFund(exchangeTradedFundNode); IDManager.SetID(exchangeTradedFundIDRef_, ob); } else if (exchangeTradedFundNode.Attributes["href"] != null) { exchangeTradedFundIDRef_ = exchangeTradedFundNode.Attributes["href"].Value; } else { exchangeTradedFund_ = new ExchangeTradedFund(exchangeTradedFundNode); } } else { exchangeTradedFund_ = new ExchangeTradedFund(exchangeTradedFundNode); } } XmlNode futureNode = xmlNode.SelectSingleNode("future"); if (futureNode != null) { if (futureNode.Attributes["href"] != null || futureNode.Attributes["id"] != null) { if (futureNode.Attributes["id"] != null) { futureIDRef_ = futureNode.Attributes["id"].Value; Future ob = new Future(futureNode); IDManager.SetID(futureIDRef_, ob); } else if (futureNode.Attributes["href"] != null) { futureIDRef_ = futureNode.Attributes["href"].Value; } else { future_ = new Future(futureNode); } } else { future_ = new Future(futureNode); } } XmlNode indexNode = xmlNode.SelectSingleNode("index"); if (indexNode != null) { if (indexNode.Attributes["href"] != null || indexNode.Attributes["id"] != null) { if (indexNode.Attributes["id"] != null) { indexIDRef_ = indexNode.Attributes["id"].Value; Index ob = new Index(indexNode); IDManager.SetID(indexIDRef_, ob); } else if (indexNode.Attributes["href"] != null) { indexIDRef_ = indexNode.Attributes["href"].Value; } else { index_ = new Index(indexNode); } } else { index_ = new Index(indexNode); } } XmlNode loanNode = xmlNode.SelectSingleNode("loan"); if (loanNode != null) { if (loanNode.Attributes["href"] != null || loanNode.Attributes["id"] != null) { if (loanNode.Attributes["id"] != null) { loanIDRef_ = loanNode.Attributes["id"].Value; Loan ob = new Loan(loanNode); IDManager.SetID(loanIDRef_, ob); } else if (loanNode.Attributes["href"] != null) { loanIDRef_ = loanNode.Attributes["href"].Value; } else { loan_ = new Loan(loanNode); } } else { loan_ = new Loan(loanNode); } } XmlNode mortgageNode = xmlNode.SelectSingleNode("mortgage"); if (mortgageNode != null) { if (mortgageNode.Attributes["href"] != null || mortgageNode.Attributes["id"] != null) { if (mortgageNode.Attributes["id"] != null) { mortgageIDRef_ = mortgageNode.Attributes["id"].Value; Mortgage ob = new Mortgage(mortgageNode); IDManager.SetID(mortgageIDRef_, ob); } else if (mortgageNode.Attributes["href"] != null) { mortgageIDRef_ = mortgageNode.Attributes["href"].Value; } else { mortgage_ = new Mortgage(mortgageNode); } } else { mortgage_ = new Mortgage(mortgageNode); } } XmlNode mutualFundNode = xmlNode.SelectSingleNode("mutualFund"); if (mutualFundNode != null) { if (mutualFundNode.Attributes["href"] != null || mutualFundNode.Attributes["id"] != null) { if (mutualFundNode.Attributes["id"] != null) { mutualFundIDRef_ = mutualFundNode.Attributes["id"].Value; MutualFund ob = new MutualFund(mutualFundNode); IDManager.SetID(mutualFundIDRef_, ob); } else if (mutualFundNode.Attributes["href"] != null) { mutualFundIDRef_ = mutualFundNode.Attributes["href"].Value; } else { mutualFund_ = new MutualFund(mutualFundNode); } } else { mutualFund_ = new MutualFund(mutualFundNode); } } XmlNode quotedCurrencyPairNode = xmlNode.SelectSingleNode("quotedCurrencyPair"); if (quotedCurrencyPairNode != null) { if (quotedCurrencyPairNode.Attributes["href"] != null || quotedCurrencyPairNode.Attributes["id"] != null) { if (quotedCurrencyPairNode.Attributes["id"] != null) { quotedCurrencyPairIDRef_ = quotedCurrencyPairNode.Attributes["id"].Value; QuotedCurrencyPair ob = new QuotedCurrencyPair(quotedCurrencyPairNode); IDManager.SetID(quotedCurrencyPairIDRef_, ob); } else if (quotedCurrencyPairNode.Attributes["href"] != null) { quotedCurrencyPairIDRef_ = quotedCurrencyPairNode.Attributes["href"].Value; } else { quotedCurrencyPair_ = new QuotedCurrencyPair(quotedCurrencyPairNode); } } else { quotedCurrencyPair_ = new QuotedCurrencyPair(quotedCurrencyPairNode); } } 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 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); } } }
public Mortgage(XmlNode xmlNode) : base(xmlNode) { XmlNodeList insurerNodeList = xmlNode.SelectNodes("insurer"); if (insurerNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in insurerNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { insurerIDRef = item.Attributes["id"].Name; LegalEntity ob = LegalEntity(); IDManager.SetID(insurerIDRef, ob); } else if (item.Attributes.ToString() == "href") { insurerIDRef = item.Attributes["href"].Name; } else { insurer = new LegalEntity(item); } } } XmlNodeList insurerReferenceNodeList = xmlNode.SelectNodes("insurerReference"); if (insurerReferenceNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in insurerReferenceNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { insurerReferenceIDRef = item.Attributes["id"].Name; LegalEntityReference ob = LegalEntityReference(); IDManager.SetID(insurerReferenceIDRef, ob); } else if (item.Attributes.ToString() == "href") { insurerReferenceIDRef = item.Attributes["href"].Name; } else { insurerReference = new LegalEntityReference(item); } } } XmlNodeList issuerNameNodeList = xmlNode.SelectNodes("issuerName"); if (issuerNameNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in issuerNameNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { issuerNameIDRef = item.Attributes["id"].Name; XsdTypeString ob = XsdTypeString(); IDManager.SetID(issuerNameIDRef, ob); } else if (item.Attributes.ToString() == "href") { issuerNameIDRef = item.Attributes["href"].Name; } else { issuerName = new XsdTypeString(item); } } } XmlNodeList issuerPartyReferenceNodeList = xmlNode.SelectNodes("issuerPartyReference"); if (issuerPartyReferenceNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in issuerPartyReferenceNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { issuerPartyReferenceIDRef = item.Attributes["id"].Name; PartyReference ob = PartyReference(); IDManager.SetID(issuerPartyReferenceIDRef, ob); } else if (item.Attributes.ToString() == "href") { issuerPartyReferenceIDRef = item.Attributes["href"].Name; } else { issuerPartyReference = new PartyReference(item); } } } XmlNodeList seniorityNodeList = xmlNode.SelectNodes("seniority"); if (seniorityNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in seniorityNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { seniorityIDRef = item.Attributes["id"].Name; CreditSeniority ob = CreditSeniority(); IDManager.SetID(seniorityIDRef, ob); } else if (item.Attributes.ToString() == "href") { seniorityIDRef = item.Attributes["href"].Name; } else { seniority = new CreditSeniority(item); } } } XmlNodeList couponTypeNodeList = xmlNode.SelectNodes("couponType"); if (couponTypeNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in couponTypeNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { couponTypeIDRef = item.Attributes["id"].Name; CouponType ob = CouponType(); IDManager.SetID(couponTypeIDRef, ob); } else if (item.Attributes.ToString() == "href") { couponTypeIDRef = item.Attributes["href"].Name; } else { couponType = new CouponType(item); } } } XmlNodeList couponRateNodeList = xmlNode.SelectNodes("couponRate"); if (couponRateNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in couponRateNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { couponRateIDRef = item.Attributes["id"].Name; XsdTypeDecimal ob = XsdTypeDecimal(); IDManager.SetID(couponRateIDRef, ob); } else if (item.Attributes.ToString() == "href") { couponRateIDRef = item.Attributes["href"].Name; } else { couponRate = new XsdTypeDecimal(item); } } } XmlNodeList maturityNodeList = xmlNode.SelectNodes("maturity"); if (maturityNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in maturityNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { maturityIDRef = item.Attributes["id"].Name; XsdTypeDate ob = XsdTypeDate(); IDManager.SetID(maturityIDRef, ob); } else if (item.Attributes.ToString() == "href") { maturityIDRef = item.Attributes["href"].Name; } else { maturity = new XsdTypeDate(item); } } } XmlNodeList paymentFrequencyNodeList = xmlNode.SelectNodes("paymentFrequency"); if (paymentFrequencyNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in paymentFrequencyNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { paymentFrequencyIDRef = item.Attributes["id"].Name; Period ob = Period(); IDManager.SetID(paymentFrequencyIDRef, ob); } else if (item.Attributes.ToString() == "href") { paymentFrequencyIDRef = item.Attributes["href"].Name; } else { paymentFrequency = new Period(item); } } } XmlNodeList dayCountFractionNodeList = xmlNode.SelectNodes("dayCountFraction"); if (dayCountFractionNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in dayCountFractionNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { dayCountFractionIDRef = item.Attributes["id"].Name; DayCountFraction ob = DayCountFraction(); IDManager.SetID(dayCountFractionIDRef, ob); } else if (item.Attributes.ToString() == "href") { dayCountFractionIDRef = item.Attributes["href"].Name; } else { dayCountFraction = new DayCountFraction(item); } } } XmlNodeList originalPrincipalAmountNodeList = xmlNode.SelectNodes("originalPrincipalAmount"); if (originalPrincipalAmountNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in originalPrincipalAmountNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { originalPrincipalAmountIDRef = item.Attributes["id"].Name; XsdTypeDecimal ob = XsdTypeDecimal(); IDManager.SetID(originalPrincipalAmountIDRef, ob); } else if (item.Attributes.ToString() == "href") { originalPrincipalAmountIDRef = item.Attributes["href"].Name; } else { originalPrincipalAmount = new XsdTypeDecimal(item); } } } XmlNodeList poolNodeList = xmlNode.SelectNodes("pool"); if (poolNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in poolNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { poolIDRef = item.Attributes["id"].Name; AssetPool ob = AssetPool(); IDManager.SetID(poolIDRef, ob); } else if (item.Attributes.ToString() == "href") { poolIDRef = item.Attributes["href"].Name; } else { pool = new AssetPool(item); } } } XmlNodeList sectorNodeList = xmlNode.SelectNodes("sector"); if (sectorNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in sectorNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { sectorIDRef = item.Attributes["id"].Name; MortgageSector ob = MortgageSector(); IDManager.SetID(sectorIDRef, ob); } else if (item.Attributes.ToString() == "href") { sectorIDRef = item.Attributes["href"].Name; } else { sector = new MortgageSector(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; XsdTypeToken ob = XsdTypeToken(); IDManager.SetID(trancheIDRef, ob); } else if (item.Attributes.ToString() == "href") { trancheIDRef = item.Attributes["href"].Name; } else { tranche = new XsdTypeToken(item); } } } }
public CreditCurve(XmlNode xmlNode) : base(xmlNode) { XmlNodeList referenceEntityNodeList = xmlNode.SelectNodes("referenceEntity"); if (referenceEntityNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in referenceEntityNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { referenceEntityIDRef = item.Attributes["id"].Name; LegalEntity ob = LegalEntity(); IDManager.SetID(referenceEntityIDRef, ob); } else if (item.Attributes.ToString() == "href") { referenceEntityIDRef = item.Attributes["href"].Name; } else { referenceEntity = new LegalEntity(item); } } } XmlNodeList creditEntityReferenceNodeList = xmlNode.SelectNodes("creditEntityReference"); if (creditEntityReferenceNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in creditEntityReferenceNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { creditEntityReferenceIDRef = item.Attributes["id"].Name; LegalEntityReference ob = LegalEntityReference(); IDManager.SetID(creditEntityReferenceIDRef, ob); } else if (item.Attributes.ToString() == "href") { creditEntityReferenceIDRef = item.Attributes["href"].Name; } else { creditEntityReference = new LegalEntityReference(item); } } } XmlNodeList creditEventsNodeList = xmlNode.SelectNodes("creditEvents"); if (creditEventsNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in creditEventsNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { creditEventsIDRef = item.Attributes["id"].Name; CreditEvents ob = CreditEvents(); IDManager.SetID(creditEventsIDRef, ob); } else if (item.Attributes.ToString() == "href") { creditEventsIDRef = item.Attributes["href"].Name; } else { creditEvents = new CreditEvents(item); } } } XmlNodeList seniorityNodeList = xmlNode.SelectNodes("seniority"); if (seniorityNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in seniorityNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { seniorityIDRef = item.Attributes["id"].Name; CreditSeniority ob = CreditSeniority(); IDManager.SetID(seniorityIDRef, ob); } else if (item.Attributes.ToString() == "href") { seniorityIDRef = item.Attributes["href"].Name; } else { seniority = new CreditSeniority(item); } } } XmlNodeList securedNodeList = xmlNode.SelectNodes("secured"); if (securedNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in securedNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { securedIDRef = item.Attributes["id"].Name; XsdTypeBoolean ob = XsdTypeBoolean(); IDManager.SetID(securedIDRef, ob); } else if (item.Attributes.ToString() == "href") { securedIDRef = item.Attributes["href"].Name; } else { secured = new XsdTypeBoolean(item); } } } XmlNodeList obligationCurrencyNodeList = xmlNode.SelectNodes("obligationCurrency"); if (obligationCurrencyNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in obligationCurrencyNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { obligationCurrencyIDRef = item.Attributes["id"].Name; Currency ob = Currency(); IDManager.SetID(obligationCurrencyIDRef, ob); } else if (item.Attributes.ToString() == "href") { obligationCurrencyIDRef = item.Attributes["href"].Name; } else { obligationCurrency = new Currency(item); } } } XmlNodeList obligationsNodeList = xmlNode.SelectNodes("obligations"); if (obligationsNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in obligationsNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { obligationsIDRef = item.Attributes["id"].Name; Obligations ob = Obligations(); IDManager.SetID(obligationsIDRef, ob); } else if (item.Attributes.ToString() == "href") { obligationsIDRef = item.Attributes["href"].Name; } else { obligations = new Obligations(item); } } } XmlNodeList deliverableObligationsNodeList = xmlNode.SelectNodes("deliverableObligations"); if (deliverableObligationsNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in deliverableObligationsNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { deliverableObligationsIDRef = item.Attributes["id"].Name; DeliverableObligations ob = DeliverableObligations(); IDManager.SetID(deliverableObligationsIDRef, ob); } else if (item.Attributes.ToString() == "href") { deliverableObligationsIDRef = item.Attributes["href"].Name; } else { deliverableObligations = new DeliverableObligations(item); } } } }
public ReferencePair(XmlNode 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 referenceObligationNode = xmlNode.SelectSingleNode("referenceObligation"); if (referenceObligationNode != null) { if (referenceObligationNode.Attributes["href"] != null || referenceObligationNode.Attributes["id"] != null) { if (referenceObligationNode.Attributes["id"] != null) { referenceObligationIDRef_ = referenceObligationNode.Attributes["id"].Value; ReferenceObligation ob = new ReferenceObligation(referenceObligationNode); IDManager.SetID(referenceObligationIDRef_, ob); } else if (referenceObligationNode.Attributes["href"] != null) { referenceObligationIDRef_ = referenceObligationNode.Attributes["href"].Value; } else { referenceObligation_ = new ReferenceObligation(referenceObligationNode); } } else { referenceObligation_ = new ReferenceObligation(referenceObligationNode); } } XmlNode noReferenceObligationNode = xmlNode.SelectSingleNode("noReferenceObligation"); if (noReferenceObligationNode != null) { if (noReferenceObligationNode.Attributes["href"] != null || noReferenceObligationNode.Attributes["id"] != null) { if (noReferenceObligationNode.Attributes["id"] != null) { noReferenceObligationIDRef_ = noReferenceObligationNode.Attributes["id"].Value; XsdTypeBoolean ob = new XsdTypeBoolean(noReferenceObligationNode); IDManager.SetID(noReferenceObligationIDRef_, ob); } else if (noReferenceObligationNode.Attributes["href"] != null) { noReferenceObligationIDRef_ = noReferenceObligationNode.Attributes["href"].Value; } else { noReferenceObligation_ = new XsdTypeBoolean(noReferenceObligationNode); } } else { noReferenceObligation_ = new XsdTypeBoolean(noReferenceObligationNode); } } XmlNode entityTypeNode = xmlNode.SelectSingleNode("entityType"); if (entityTypeNode != null) { if (entityTypeNode.Attributes["href"] != null || entityTypeNode.Attributes["id"] != null) { if (entityTypeNode.Attributes["id"] != null) { entityTypeIDRef_ = entityTypeNode.Attributes["id"].Value; EntityType ob = new EntityType(entityTypeNode); IDManager.SetID(entityTypeIDRef_, ob); } else if (entityTypeNode.Attributes["href"] != null) { entityTypeIDRef_ = entityTypeNode.Attributes["href"].Value; } else { entityType_ = new EntityType(entityTypeNode); } } else { entityType_ = new EntityType(entityTypeNode); } } }
public ReferencePair(XmlNode xmlNode) { XmlNodeList referenceEntityNodeList = xmlNode.SelectNodes("referenceEntity"); if (referenceEntityNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in referenceEntityNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { referenceEntityIDRef = item.Attributes["id"].Name; LegalEntity ob = LegalEntity(); IDManager.SetID(referenceEntityIDRef, ob); } else if (item.Attributes.ToString() == "href") { referenceEntityIDRef = item.Attributes["href"].Name; } else { referenceEntity = new LegalEntity(item); } } } XmlNodeList referenceObligationNodeList = xmlNode.SelectNodes("referenceObligation"); if (referenceObligationNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in referenceObligationNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { referenceObligationIDRef = item.Attributes["id"].Name; ReferenceObligation ob = ReferenceObligation(); IDManager.SetID(referenceObligationIDRef, ob); } else if (item.Attributes.ToString() == "href") { referenceObligationIDRef = item.Attributes["href"].Name; } else { referenceObligation = new ReferenceObligation(item); } } } XmlNodeList noReferenceObligationNodeList = xmlNode.SelectNodes("noReferenceObligation"); if (noReferenceObligationNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in noReferenceObligationNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { noReferenceObligationIDRef = item.Attributes["id"].Name; XsdTypeBoolean ob = XsdTypeBoolean(); IDManager.SetID(noReferenceObligationIDRef, ob); } else if (item.Attributes.ToString() == "href") { noReferenceObligationIDRef = item.Attributes["href"].Name; } else { noReferenceObligation = new XsdTypeBoolean(item); } } } XmlNodeList entityTypeNodeList = xmlNode.SelectNodes("entityType"); if (entityTypeNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in entityTypeNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { entityTypeIDRef = item.Attributes["id"].Name; EntityType ob = EntityType(); IDManager.SetID(entityTypeIDRef, ob); } else if (item.Attributes.ToString() == "href") { entityTypeIDRef = item.Attributes["href"].Name; } else { entityType = new EntityType(item); } } } }
public ReferenceObligation(XmlNode xmlNode) { XmlNode bondNode = xmlNode.SelectSingleNode("bond"); if (bondNode != null) { if (bondNode.Attributes["href"] != null || bondNode.Attributes["id"] != null) { if (bondNode.Attributes["id"] != null) { bondIDRef_ = bondNode.Attributes["id"].Value; Bond ob = new Bond(bondNode); IDManager.SetID(bondIDRef_, ob); } else if (bondNode.Attributes["href"] != null) { bondIDRef_ = bondNode.Attributes["href"].Value; } else { bond_ = new Bond(bondNode); } } else { bond_ = new Bond(bondNode); } } XmlNode convertibleBondNode = xmlNode.SelectSingleNode("convertibleBond"); if (convertibleBondNode != null) { if (convertibleBondNode.Attributes["href"] != null || convertibleBondNode.Attributes["id"] != null) { if (convertibleBondNode.Attributes["id"] != null) { convertibleBondIDRef_ = convertibleBondNode.Attributes["id"].Value; ConvertibleBond ob = new ConvertibleBond(convertibleBondNode); IDManager.SetID(convertibleBondIDRef_, ob); } else if (convertibleBondNode.Attributes["href"] != null) { convertibleBondIDRef_ = convertibleBondNode.Attributes["href"].Value; } else { convertibleBond_ = new ConvertibleBond(convertibleBondNode); } } else { convertibleBond_ = new ConvertibleBond(convertibleBondNode); } } XmlNode mortgageNode = xmlNode.SelectSingleNode("mortgage"); if (mortgageNode != null) { if (mortgageNode.Attributes["href"] != null || mortgageNode.Attributes["id"] != null) { if (mortgageNode.Attributes["id"] != null) { mortgageIDRef_ = mortgageNode.Attributes["id"].Value; Mortgage ob = new Mortgage(mortgageNode); IDManager.SetID(mortgageIDRef_, ob); } else if (mortgageNode.Attributes["href"] != null) { mortgageIDRef_ = mortgageNode.Attributes["href"].Value; } else { mortgage_ = new Mortgage(mortgageNode); } } else { mortgage_ = new Mortgage(mortgageNode); } } XmlNode loanNode = xmlNode.SelectSingleNode("loan"); if (loanNode != null) { if (loanNode.Attributes["href"] != null || loanNode.Attributes["id"] != null) { if (loanNode.Attributes["id"] != null) { loanIDRef_ = loanNode.Attributes["id"].Value; Loan ob = new Loan(loanNode); IDManager.SetID(loanIDRef_, ob); } else if (loanNode.Attributes["href"] != null) { loanIDRef_ = loanNode.Attributes["href"].Value; } else { loan_ = new Loan(loanNode); } } else { loan_ = new Loan(loanNode); } } XmlNode primaryObligorNode = xmlNode.SelectSingleNode("primaryObligor"); if (primaryObligorNode != null) { if (primaryObligorNode.Attributes["href"] != null || primaryObligorNode.Attributes["id"] != null) { if (primaryObligorNode.Attributes["id"] != null) { primaryObligorIDRef_ = primaryObligorNode.Attributes["id"].Value; LegalEntity ob = new LegalEntity(primaryObligorNode); IDManager.SetID(primaryObligorIDRef_, ob); } else if (primaryObligorNode.Attributes["href"] != null) { primaryObligorIDRef_ = primaryObligorNode.Attributes["href"].Value; } else { primaryObligor_ = new LegalEntity(primaryObligorNode); } } else { primaryObligor_ = new LegalEntity(primaryObligorNode); } } XmlNode primaryObligorReferenceNode = xmlNode.SelectSingleNode("primaryObligorReference"); if (primaryObligorReferenceNode != null) { if (primaryObligorReferenceNode.Attributes["href"] != null || primaryObligorReferenceNode.Attributes["id"] != null) { if (primaryObligorReferenceNode.Attributes["id"] != null) { primaryObligorReferenceIDRef_ = primaryObligorReferenceNode.Attributes["id"].Value; LegalEntityReference ob = new LegalEntityReference(primaryObligorReferenceNode); IDManager.SetID(primaryObligorReferenceIDRef_, ob); } else if (primaryObligorReferenceNode.Attributes["href"] != null) { primaryObligorReferenceIDRef_ = primaryObligorReferenceNode.Attributes["href"].Value; } else { primaryObligorReference_ = new LegalEntityReference(primaryObligorReferenceNode); } } else { primaryObligorReference_ = new LegalEntityReference(primaryObligorReferenceNode); } } XmlNode guarantorNode = xmlNode.SelectSingleNode("guarantor"); if (guarantorNode != null) { if (guarantorNode.Attributes["href"] != null || guarantorNode.Attributes["id"] != null) { if (guarantorNode.Attributes["id"] != null) { guarantorIDRef_ = guarantorNode.Attributes["id"].Value; LegalEntity ob = new LegalEntity(guarantorNode); IDManager.SetID(guarantorIDRef_, ob); } else if (guarantorNode.Attributes["href"] != null) { guarantorIDRef_ = guarantorNode.Attributes["href"].Value; } else { guarantor_ = new LegalEntity(guarantorNode); } } else { guarantor_ = new LegalEntity(guarantorNode); } } XmlNode guarantorReferenceNode = xmlNode.SelectSingleNode("guarantorReference"); if (guarantorReferenceNode != null) { if (guarantorReferenceNode.Attributes["href"] != null || guarantorReferenceNode.Attributes["id"] != null) { if (guarantorReferenceNode.Attributes["id"] != null) { guarantorReferenceIDRef_ = guarantorReferenceNode.Attributes["id"].Value; LegalEntityReference ob = new LegalEntityReference(guarantorReferenceNode); IDManager.SetID(guarantorReferenceIDRef_, ob); } else if (guarantorReferenceNode.Attributes["href"] != null) { guarantorReferenceIDRef_ = guarantorReferenceNode.Attributes["href"].Value; } else { guarantorReference_ = new LegalEntityReference(guarantorReferenceNode); } } else { guarantorReference_ = new LegalEntityReference(guarantorReferenceNode); } } }
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 CreditCurve(XmlNode xmlNode) : base(xmlNode) { XmlNodeList referenceEntityNodeList = xmlNode.SelectNodes("referenceEntity"); if (referenceEntityNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in referenceEntityNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { referenceEntityIDRef = item.Attributes["id"].Name; LegalEntity ob = LegalEntity(); IDManager.SetID(referenceEntityIDRef, ob); } else if (item.Attributes.ToString() == "href") { referenceEntityIDRef = item.Attributes["href"].Name; } else { referenceEntity = new LegalEntity(item); } } } XmlNodeList creditEntityReferenceNodeList = xmlNode.SelectNodes("creditEntityReference"); if (creditEntityReferenceNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in creditEntityReferenceNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { creditEntityReferenceIDRef = item.Attributes["id"].Name; LegalEntityReference ob = LegalEntityReference(); IDManager.SetID(creditEntityReferenceIDRef, ob); } else if (item.Attributes.ToString() == "href") { creditEntityReferenceIDRef = item.Attributes["href"].Name; } else { creditEntityReference = new LegalEntityReference(item); } } } XmlNodeList creditEventsNodeList = xmlNode.SelectNodes("creditEvents"); if (creditEventsNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in creditEventsNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { creditEventsIDRef = item.Attributes["id"].Name; CreditEvents ob = CreditEvents(); IDManager.SetID(creditEventsIDRef, ob); } else if (item.Attributes.ToString() == "href") { creditEventsIDRef = item.Attributes["href"].Name; } else { creditEvents = new CreditEvents(item); } } } XmlNodeList seniorityNodeList = xmlNode.SelectNodes("seniority"); if (seniorityNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in seniorityNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { seniorityIDRef = item.Attributes["id"].Name; CreditSeniority ob = CreditSeniority(); IDManager.SetID(seniorityIDRef, ob); } else if (item.Attributes.ToString() == "href") { seniorityIDRef = item.Attributes["href"].Name; } else { seniority = new CreditSeniority(item); } } } XmlNodeList securedNodeList = xmlNode.SelectNodes("secured"); if (securedNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in securedNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { securedIDRef = item.Attributes["id"].Name; XsdTypeBoolean ob = XsdTypeBoolean(); IDManager.SetID(securedIDRef, ob); } else if (item.Attributes.ToString() == "href") { securedIDRef = item.Attributes["href"].Name; } else { secured = new XsdTypeBoolean(item); } } } XmlNodeList obligationCurrencyNodeList = xmlNode.SelectNodes("obligationCurrency"); if (obligationCurrencyNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in obligationCurrencyNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { obligationCurrencyIDRef = item.Attributes["id"].Name; Currency ob = Currency(); IDManager.SetID(obligationCurrencyIDRef, ob); } else if (item.Attributes.ToString() == "href") { obligationCurrencyIDRef = item.Attributes["href"].Name; } else { obligationCurrency = new Currency(item); } } } XmlNodeList obligationsNodeList = xmlNode.SelectNodes("obligations"); if (obligationsNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in obligationsNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { obligationsIDRef = item.Attributes["id"].Name; Obligations ob = Obligations(); IDManager.SetID(obligationsIDRef, ob); } else if (item.Attributes.ToString() == "href") { obligationsIDRef = item.Attributes["href"].Name; } else { obligations = new Obligations(item); } } } XmlNodeList deliverableObligationsNodeList = xmlNode.SelectNodes("deliverableObligations"); if (deliverableObligationsNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in deliverableObligationsNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { deliverableObligationsIDRef = item.Attributes["id"].Name; DeliverableObligations ob = DeliverableObligations(); IDManager.SetID(deliverableObligationsIDRef, ob); } else if (item.Attributes.ToString() == "href") { deliverableObligationsIDRef = item.Attributes["href"].Name; } else { deliverableObligations = new DeliverableObligations(item); } } } }
public CreditEventNoticeDocument(XmlNode xmlNode) { XmlNode affectedTransactionsNode = xmlNode.SelectSingleNode("affectedTransactions"); if (affectedTransactionsNode != null) { if (affectedTransactionsNode.Attributes["href"] != null || affectedTransactionsNode.Attributes["id"] != null) { if (affectedTransactionsNode.Attributes["id"] != null) { affectedTransactionsIDRef_ = affectedTransactionsNode.Attributes["id"].Value; AffectedTransactions ob = new AffectedTransactions(affectedTransactionsNode); IDManager.SetID(affectedTransactionsIDRef_, ob); } else if (affectedTransactionsNode.Attributes["href"] != null) { affectedTransactionsIDRef_ = affectedTransactionsNode.Attributes["href"].Value; } else { affectedTransactions_ = new AffectedTransactions(affectedTransactionsNode); } } else { affectedTransactions_ = new AffectedTransactions(affectedTransactionsNode); } } 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 creditEventNode = xmlNode.SelectSingleNode("creditEvent"); if (creditEventNode != null) { if (creditEventNode.Attributes["href"] != null || creditEventNode.Attributes["id"] != null) { if (creditEventNode.Attributes["id"] != null) { creditEventIDRef_ = creditEventNode.Attributes["id"].Value; CreditEvent ob = new CreditEvent(creditEventNode); IDManager.SetID(creditEventIDRef_, ob); } else if (creditEventNode.Attributes["href"] != null) { creditEventIDRef_ = creditEventNode.Attributes["href"].Value; } else { creditEvent_ = new CreditEvent(creditEventNode); } } else { creditEvent_ = new CreditEvent(creditEventNode); } } XmlNode bankruptcyNode = xmlNode.SelectSingleNode("bankruptcy"); if (bankruptcyNode != null) { if (bankruptcyNode.Attributes["href"] != null || bankruptcyNode.Attributes["id"] != null) { if (bankruptcyNode.Attributes["id"] != null) { bankruptcyIDRef_ = bankruptcyNode.Attributes["id"].Value; BankruptcyEvent ob = new BankruptcyEvent(bankruptcyNode); IDManager.SetID(bankruptcyIDRef_, ob); } else if (bankruptcyNode.Attributes["href"] != null) { bankruptcyIDRef_ = bankruptcyNode.Attributes["href"].Value; } else { bankruptcy_ = new BankruptcyEvent(bankruptcyNode); } } else { bankruptcy_ = new BankruptcyEvent(bankruptcyNode); } } XmlNode failureToPayNode = xmlNode.SelectSingleNode("failureToPay"); if (failureToPayNode != null) { if (failureToPayNode.Attributes["href"] != null || failureToPayNode.Attributes["id"] != null) { if (failureToPayNode.Attributes["id"] != null) { failureToPayIDRef_ = failureToPayNode.Attributes["id"].Value; FailureToPayEvent ob = new FailureToPayEvent(failureToPayNode); IDManager.SetID(failureToPayIDRef_, ob); } else if (failureToPayNode.Attributes["href"] != null) { failureToPayIDRef_ = failureToPayNode.Attributes["href"].Value; } else { failureToPay_ = new FailureToPayEvent(failureToPayNode); } } else { failureToPay_ = new FailureToPayEvent(failureToPayNode); } } XmlNode obligationAccelerationNode = xmlNode.SelectSingleNode("obligationAcceleration"); if (obligationAccelerationNode != null) { if (obligationAccelerationNode.Attributes["href"] != null || obligationAccelerationNode.Attributes["id"] != null) { if (obligationAccelerationNode.Attributes["id"] != null) { obligationAccelerationIDRef_ = obligationAccelerationNode.Attributes["id"].Value; ObligationAccelerationEvent ob = new ObligationAccelerationEvent(obligationAccelerationNode); IDManager.SetID(obligationAccelerationIDRef_, ob); } else if (obligationAccelerationNode.Attributes["href"] != null) { obligationAccelerationIDRef_ = obligationAccelerationNode.Attributes["href"].Value; } else { obligationAcceleration_ = new ObligationAccelerationEvent(obligationAccelerationNode); } } else { obligationAcceleration_ = new ObligationAccelerationEvent(obligationAccelerationNode); } } XmlNode obligationDefaultNode = xmlNode.SelectSingleNode("obligationDefault"); if (obligationDefaultNode != null) { if (obligationDefaultNode.Attributes["href"] != null || obligationDefaultNode.Attributes["id"] != null) { if (obligationDefaultNode.Attributes["id"] != null) { obligationDefaultIDRef_ = obligationDefaultNode.Attributes["id"].Value; ObligationDefaultEvent ob = new ObligationDefaultEvent(obligationDefaultNode); IDManager.SetID(obligationDefaultIDRef_, ob); } else if (obligationDefaultNode.Attributes["href"] != null) { obligationDefaultIDRef_ = obligationDefaultNode.Attributes["href"].Value; } else { obligationDefault_ = new ObligationDefaultEvent(obligationDefaultNode); } } else { obligationDefault_ = new ObligationDefaultEvent(obligationDefaultNode); } } XmlNode repudiationMoratoriumNode = xmlNode.SelectSingleNode("repudiationMoratorium"); if (repudiationMoratoriumNode != null) { if (repudiationMoratoriumNode.Attributes["href"] != null || repudiationMoratoriumNode.Attributes["id"] != null) { if (repudiationMoratoriumNode.Attributes["id"] != null) { repudiationMoratoriumIDRef_ = repudiationMoratoriumNode.Attributes["id"].Value; RepudiationMoratoriumEvent ob = new RepudiationMoratoriumEvent(repudiationMoratoriumNode); IDManager.SetID(repudiationMoratoriumIDRef_, ob); } else if (repudiationMoratoriumNode.Attributes["href"] != null) { repudiationMoratoriumIDRef_ = repudiationMoratoriumNode.Attributes["href"].Value; } else { repudiationMoratorium_ = new RepudiationMoratoriumEvent(repudiationMoratoriumNode); } } else { repudiationMoratorium_ = new RepudiationMoratoriumEvent(repudiationMoratoriumNode); } } XmlNode restructuringNode = xmlNode.SelectSingleNode("restructuring"); if (restructuringNode != null) { if (restructuringNode.Attributes["href"] != null || restructuringNode.Attributes["id"] != null) { if (restructuringNode.Attributes["id"] != null) { restructuringIDRef_ = restructuringNode.Attributes["id"].Value; RestructuringEvent ob = new RestructuringEvent(restructuringNode); IDManager.SetID(restructuringIDRef_, ob); } else if (restructuringNode.Attributes["href"] != null) { restructuringIDRef_ = restructuringNode.Attributes["href"].Value; } else { restructuring_ = new RestructuringEvent(restructuringNode); } } else { restructuring_ = new RestructuringEvent(restructuringNode); } } XmlNodeList publiclyAvailableInformationNodeList = xmlNode.SelectNodes("publiclyAvailableInformation"); if (publiclyAvailableInformationNodeList != null) { this.publiclyAvailableInformation_ = new List <Resource>(); foreach (XmlNode item in publiclyAvailableInformationNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] != null) { if (item.Attributes["id"] != null) { publiclyAvailableInformationIDRef_ = item.Attributes["id"].Value; publiclyAvailableInformation_.Add(new Resource(item)); IDManager.SetID(publiclyAvailableInformationIDRef_, publiclyAvailableInformation_[publiclyAvailableInformation_.Count - 1]); } else if (item.Attributes["href"] != null) { publiclyAvailableInformationIDRef_ = item.Attributes["href"].Value; } else { publiclyAvailableInformation_.Add(new Resource(item)); } } else { publiclyAvailableInformation_.Add(new Resource(item)); } } } XmlNode notifyingPartyReferenceNode = xmlNode.SelectSingleNode("notifyingPartyReference"); if (notifyingPartyReferenceNode != null) { if (notifyingPartyReferenceNode.Attributes["href"] != null || notifyingPartyReferenceNode.Attributes["id"] != null) { if (notifyingPartyReferenceNode.Attributes["id"] != null) { notifyingPartyReferenceIDRef_ = notifyingPartyReferenceNode.Attributes["id"].Value; PartyReference ob = new PartyReference(notifyingPartyReferenceNode); IDManager.SetID(notifyingPartyReferenceIDRef_, ob); } else if (notifyingPartyReferenceNode.Attributes["href"] != null) { notifyingPartyReferenceIDRef_ = notifyingPartyReferenceNode.Attributes["href"].Value; } else { notifyingPartyReference_ = new PartyReference(notifyingPartyReferenceNode); } } else { notifyingPartyReference_ = new PartyReference(notifyingPartyReferenceNode); } } XmlNode notifiedPartyReferenceNode = xmlNode.SelectSingleNode("notifiedPartyReference"); if (notifiedPartyReferenceNode != null) { if (notifiedPartyReferenceNode.Attributes["href"] != null || notifiedPartyReferenceNode.Attributes["id"] != null) { if (notifiedPartyReferenceNode.Attributes["id"] != null) { notifiedPartyReferenceIDRef_ = notifiedPartyReferenceNode.Attributes["id"].Value; PartyReference ob = new PartyReference(notifiedPartyReferenceNode); IDManager.SetID(notifiedPartyReferenceIDRef_, ob); } else if (notifiedPartyReferenceNode.Attributes["href"] != null) { notifiedPartyReferenceIDRef_ = notifiedPartyReferenceNode.Attributes["href"].Value; } else { notifiedPartyReference_ = new PartyReference(notifiedPartyReferenceNode); } } else { notifiedPartyReference_ = new PartyReference(notifiedPartyReferenceNode); } } XmlNode creditEventNoticeDateNode = xmlNode.SelectSingleNode("creditEventNoticeDate"); if (creditEventNoticeDateNode != null) { if (creditEventNoticeDateNode.Attributes["href"] != null || creditEventNoticeDateNode.Attributes["id"] != null) { if (creditEventNoticeDateNode.Attributes["id"] != null) { creditEventNoticeDateIDRef_ = creditEventNoticeDateNode.Attributes["id"].Value; XsdTypeDate ob = new XsdTypeDate(creditEventNoticeDateNode); IDManager.SetID(creditEventNoticeDateIDRef_, ob); } else if (creditEventNoticeDateNode.Attributes["href"] != null) { creditEventNoticeDateIDRef_ = creditEventNoticeDateNode.Attributes["href"].Value; } else { creditEventNoticeDate_ = new XsdTypeDate(creditEventNoticeDateNode); } } else { creditEventNoticeDate_ = new XsdTypeDate(creditEventNoticeDateNode); } } XmlNode creditEventDateNode = xmlNode.SelectSingleNode("creditEventDate"); if (creditEventDateNode != null) { if (creditEventDateNode.Attributes["href"] != null || creditEventDateNode.Attributes["id"] != null) { if (creditEventDateNode.Attributes["id"] != null) { creditEventDateIDRef_ = creditEventDateNode.Attributes["id"].Value; XsdTypeDate ob = new XsdTypeDate(creditEventDateNode); IDManager.SetID(creditEventDateIDRef_, ob); } else if (creditEventDateNode.Attributes["href"] != null) { creditEventDateIDRef_ = creditEventDateNode.Attributes["href"].Value; } else { creditEventDate_ = new XsdTypeDate(creditEventDateNode); } } else { creditEventDate_ = new XsdTypeDate(creditEventDateNode); } } }
public CreditEventNoticeDocument(XmlNode xmlNode) { XmlNode affectedTransactionsNode = xmlNode.SelectSingleNode("affectedTransactions"); if (affectedTransactionsNode != null) { if (affectedTransactionsNode.Attributes["href"] != null || affectedTransactionsNode.Attributes["id"] != null) { if (affectedTransactionsNode.Attributes["id"] != null) { affectedTransactionsIDRef_ = affectedTransactionsNode.Attributes["id"].Value; AffectedTransactions ob = new AffectedTransactions(affectedTransactionsNode); IDManager.SetID(affectedTransactionsIDRef_, ob); } else if (affectedTransactionsNode.Attributes["href"] != null) { affectedTransactionsIDRef_ = affectedTransactionsNode.Attributes["href"].Value; } else { affectedTransactions_ = new AffectedTransactions(affectedTransactionsNode); } } else { affectedTransactions_ = new AffectedTransactions(affectedTransactionsNode); } } 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 creditEventNode = xmlNode.SelectSingleNode("creditEvent"); if (creditEventNode != null) { if (creditEventNode.Attributes["href"] != null || creditEventNode.Attributes["id"] != null) { if (creditEventNode.Attributes["id"] != null) { creditEventIDRef_ = creditEventNode.Attributes["id"].Value; CreditEvent ob = new CreditEvent(creditEventNode); IDManager.SetID(creditEventIDRef_, ob); } else if (creditEventNode.Attributes["href"] != null) { creditEventIDRef_ = creditEventNode.Attributes["href"].Value; } else { creditEvent_ = new CreditEvent(creditEventNode); } } else { creditEvent_ = new CreditEvent(creditEventNode); } } XmlNode bankruptcyNode = xmlNode.SelectSingleNode("bankruptcy"); if (bankruptcyNode != null) { if (bankruptcyNode.Attributes["href"] != null || bankruptcyNode.Attributes["id"] != null) { if (bankruptcyNode.Attributes["id"] != null) { bankruptcyIDRef_ = bankruptcyNode.Attributes["id"].Value; BankruptcyEvent ob = new BankruptcyEvent(bankruptcyNode); IDManager.SetID(bankruptcyIDRef_, ob); } else if (bankruptcyNode.Attributes["href"] != null) { bankruptcyIDRef_ = bankruptcyNode.Attributes["href"].Value; } else { bankruptcy_ = new BankruptcyEvent(bankruptcyNode); } } else { bankruptcy_ = new BankruptcyEvent(bankruptcyNode); } } XmlNode failureToPayNode = xmlNode.SelectSingleNode("failureToPay"); if (failureToPayNode != null) { if (failureToPayNode.Attributes["href"] != null || failureToPayNode.Attributes["id"] != null) { if (failureToPayNode.Attributes["id"] != null) { failureToPayIDRef_ = failureToPayNode.Attributes["id"].Value; FailureToPayEvent ob = new FailureToPayEvent(failureToPayNode); IDManager.SetID(failureToPayIDRef_, ob); } else if (failureToPayNode.Attributes["href"] != null) { failureToPayIDRef_ = failureToPayNode.Attributes["href"].Value; } else { failureToPay_ = new FailureToPayEvent(failureToPayNode); } } else { failureToPay_ = new FailureToPayEvent(failureToPayNode); } } XmlNode obligationAccelerationNode = xmlNode.SelectSingleNode("obligationAcceleration"); if (obligationAccelerationNode != null) { if (obligationAccelerationNode.Attributes["href"] != null || obligationAccelerationNode.Attributes["id"] != null) { if (obligationAccelerationNode.Attributes["id"] != null) { obligationAccelerationIDRef_ = obligationAccelerationNode.Attributes["id"].Value; ObligationAccelerationEvent ob = new ObligationAccelerationEvent(obligationAccelerationNode); IDManager.SetID(obligationAccelerationIDRef_, ob); } else if (obligationAccelerationNode.Attributes["href"] != null) { obligationAccelerationIDRef_ = obligationAccelerationNode.Attributes["href"].Value; } else { obligationAcceleration_ = new ObligationAccelerationEvent(obligationAccelerationNode); } } else { obligationAcceleration_ = new ObligationAccelerationEvent(obligationAccelerationNode); } } XmlNode obligationDefaultNode = xmlNode.SelectSingleNode("obligationDefault"); if (obligationDefaultNode != null) { if (obligationDefaultNode.Attributes["href"] != null || obligationDefaultNode.Attributes["id"] != null) { if (obligationDefaultNode.Attributes["id"] != null) { obligationDefaultIDRef_ = obligationDefaultNode.Attributes["id"].Value; ObligationDefaultEvent ob = new ObligationDefaultEvent(obligationDefaultNode); IDManager.SetID(obligationDefaultIDRef_, ob); } else if (obligationDefaultNode.Attributes["href"] != null) { obligationDefaultIDRef_ = obligationDefaultNode.Attributes["href"].Value; } else { obligationDefault_ = new ObligationDefaultEvent(obligationDefaultNode); } } else { obligationDefault_ = new ObligationDefaultEvent(obligationDefaultNode); } } XmlNode repudiationMoratoriumNode = xmlNode.SelectSingleNode("repudiationMoratorium"); if (repudiationMoratoriumNode != null) { if (repudiationMoratoriumNode.Attributes["href"] != null || repudiationMoratoriumNode.Attributes["id"] != null) { if (repudiationMoratoriumNode.Attributes["id"] != null) { repudiationMoratoriumIDRef_ = repudiationMoratoriumNode.Attributes["id"].Value; RepudiationMoratoriumEvent ob = new RepudiationMoratoriumEvent(repudiationMoratoriumNode); IDManager.SetID(repudiationMoratoriumIDRef_, ob); } else if (repudiationMoratoriumNode.Attributes["href"] != null) { repudiationMoratoriumIDRef_ = repudiationMoratoriumNode.Attributes["href"].Value; } else { repudiationMoratorium_ = new RepudiationMoratoriumEvent(repudiationMoratoriumNode); } } else { repudiationMoratorium_ = new RepudiationMoratoriumEvent(repudiationMoratoriumNode); } } XmlNode restructuringNode = xmlNode.SelectSingleNode("restructuring"); if (restructuringNode != null) { if (restructuringNode.Attributes["href"] != null || restructuringNode.Attributes["id"] != null) { if (restructuringNode.Attributes["id"] != null) { restructuringIDRef_ = restructuringNode.Attributes["id"].Value; RestructuringEvent ob = new RestructuringEvent(restructuringNode); IDManager.SetID(restructuringIDRef_, ob); } else if (restructuringNode.Attributes["href"] != null) { restructuringIDRef_ = restructuringNode.Attributes["href"].Value; } else { restructuring_ = new RestructuringEvent(restructuringNode); } } else { restructuring_ = new RestructuringEvent(restructuringNode); } } XmlNodeList publiclyAvailableInformationNodeList = xmlNode.SelectNodes("publiclyAvailableInformation"); if (publiclyAvailableInformationNodeList != null) { this.publiclyAvailableInformation_ = new List<Resource>(); foreach (XmlNode item in publiclyAvailableInformationNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] != null) { if (item.Attributes["id"] != null) { publiclyAvailableInformationIDRef_ = item.Attributes["id"].Value; publiclyAvailableInformation_.Add(new Resource(item)); IDManager.SetID(publiclyAvailableInformationIDRef_, publiclyAvailableInformation_[publiclyAvailableInformation_.Count - 1 ]); } else if (item.Attributes["href"] != null) { publiclyAvailableInformationIDRef_ = item.Attributes["href"].Value; } else { publiclyAvailableInformation_.Add(new Resource(item)); } } else { publiclyAvailableInformation_.Add(new Resource(item)); } } } XmlNode notifyingPartyReferenceNode = xmlNode.SelectSingleNode("notifyingPartyReference"); if (notifyingPartyReferenceNode != null) { if (notifyingPartyReferenceNode.Attributes["href"] != null || notifyingPartyReferenceNode.Attributes["id"] != null) { if (notifyingPartyReferenceNode.Attributes["id"] != null) { notifyingPartyReferenceIDRef_ = notifyingPartyReferenceNode.Attributes["id"].Value; PartyReference ob = new PartyReference(notifyingPartyReferenceNode); IDManager.SetID(notifyingPartyReferenceIDRef_, ob); } else if (notifyingPartyReferenceNode.Attributes["href"] != null) { notifyingPartyReferenceIDRef_ = notifyingPartyReferenceNode.Attributes["href"].Value; } else { notifyingPartyReference_ = new PartyReference(notifyingPartyReferenceNode); } } else { notifyingPartyReference_ = new PartyReference(notifyingPartyReferenceNode); } } XmlNode notifiedPartyReferenceNode = xmlNode.SelectSingleNode("notifiedPartyReference"); if (notifiedPartyReferenceNode != null) { if (notifiedPartyReferenceNode.Attributes["href"] != null || notifiedPartyReferenceNode.Attributes["id"] != null) { if (notifiedPartyReferenceNode.Attributes["id"] != null) { notifiedPartyReferenceIDRef_ = notifiedPartyReferenceNode.Attributes["id"].Value; PartyReference ob = new PartyReference(notifiedPartyReferenceNode); IDManager.SetID(notifiedPartyReferenceIDRef_, ob); } else if (notifiedPartyReferenceNode.Attributes["href"] != null) { notifiedPartyReferenceIDRef_ = notifiedPartyReferenceNode.Attributes["href"].Value; } else { notifiedPartyReference_ = new PartyReference(notifiedPartyReferenceNode); } } else { notifiedPartyReference_ = new PartyReference(notifiedPartyReferenceNode); } } XmlNode creditEventNoticeDateNode = xmlNode.SelectSingleNode("creditEventNoticeDate"); if (creditEventNoticeDateNode != null) { if (creditEventNoticeDateNode.Attributes["href"] != null || creditEventNoticeDateNode.Attributes["id"] != null) { if (creditEventNoticeDateNode.Attributes["id"] != null) { creditEventNoticeDateIDRef_ = creditEventNoticeDateNode.Attributes["id"].Value; XsdTypeDate ob = new XsdTypeDate(creditEventNoticeDateNode); IDManager.SetID(creditEventNoticeDateIDRef_, ob); } else if (creditEventNoticeDateNode.Attributes["href"] != null) { creditEventNoticeDateIDRef_ = creditEventNoticeDateNode.Attributes["href"].Value; } else { creditEventNoticeDate_ = new XsdTypeDate(creditEventNoticeDateNode); } } else { creditEventNoticeDate_ = new XsdTypeDate(creditEventNoticeDateNode); } } XmlNode creditEventDateNode = xmlNode.SelectSingleNode("creditEventDate"); if (creditEventDateNode != null) { if (creditEventDateNode.Attributes["href"] != null || creditEventDateNode.Attributes["id"] != null) { if (creditEventDateNode.Attributes["id"] != null) { creditEventDateIDRef_ = creditEventDateNode.Attributes["id"].Value; XsdTypeDate ob = new XsdTypeDate(creditEventDateNode); IDManager.SetID(creditEventDateIDRef_, ob); } else if (creditEventDateNode.Attributes["href"] != null) { creditEventDateIDRef_ = creditEventDateNode.Attributes["href"].Value; } else { creditEventDate_ = new XsdTypeDate(creditEventDateNode); } } else { creditEventDate_ = new XsdTypeDate(creditEventDateNode); } } }
public SimpleCreditDefaultSwap(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 termNode = xmlNode.SelectSingleNode("term"); if (termNode != null) { if (termNode.Attributes["href"] != null || termNode.Attributes["id"] != null) { if (termNode.Attributes["id"] != null) { termIDRef_ = termNode.Attributes["id"].Value; Period ob = new Period(termNode); IDManager.SetID(termIDRef_, ob); } else if (termNode.Attributes["href"] != null) { termIDRef_ = termNode.Attributes["href"].Value; } else { term_ = new Period(termNode); } } else { term_ = new Period(termNode); } } XmlNode paymentFrequencyNode = xmlNode.SelectSingleNode("paymentFrequency"); if (paymentFrequencyNode != null) { if (paymentFrequencyNode.Attributes["href"] != null || paymentFrequencyNode.Attributes["id"] != null) { if (paymentFrequencyNode.Attributes["id"] != null) { paymentFrequencyIDRef_ = paymentFrequencyNode.Attributes["id"].Value; Period ob = new Period(paymentFrequencyNode); IDManager.SetID(paymentFrequencyIDRef_, ob); } else if (paymentFrequencyNode.Attributes["href"] != null) { paymentFrequencyIDRef_ = paymentFrequencyNode.Attributes["href"].Value; } else { paymentFrequency_ = new Period(paymentFrequencyNode); } } else { paymentFrequency_ = new Period(paymentFrequencyNode); } } }
public SimpleCreditDefaultSwap(XmlNode xmlNode) : base(xmlNode) { XmlNodeList referenceEntityNodeList = xmlNode.SelectNodes("referenceEntity"); if (referenceEntityNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in referenceEntityNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { referenceEntityIDRef = item.Attributes["id"].Name; LegalEntity ob = LegalEntity(); IDManager.SetID(referenceEntityIDRef, ob); } else if (item.Attributes.ToString() == "href") { referenceEntityIDRef = item.Attributes["href"].Name; } else { referenceEntity = new LegalEntity(item); } } } XmlNodeList creditEntityReferenceNodeList = xmlNode.SelectNodes("creditEntityReference"); if (creditEntityReferenceNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in creditEntityReferenceNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { creditEntityReferenceIDRef = item.Attributes["id"].Name; LegalEntityReference ob = LegalEntityReference(); IDManager.SetID(creditEntityReferenceIDRef, ob); } else if (item.Attributes.ToString() == "href") { creditEntityReferenceIDRef = item.Attributes["href"].Name; } else { creditEntityReference = new LegalEntityReference(item); } } } 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; Period ob = Period(); IDManager.SetID(termIDRef, ob); } else if (item.Attributes.ToString() == "href") { termIDRef = item.Attributes["href"].Name; } else { term = new Period(item); } } } XmlNodeList paymentFrequencyNodeList = xmlNode.SelectNodes("paymentFrequency"); if (paymentFrequencyNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in paymentFrequencyNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { paymentFrequencyIDRef = item.Attributes["id"].Name; Period ob = Period(); IDManager.SetID(paymentFrequencyIDRef, ob); } else if (item.Attributes.ToString() == "href") { paymentFrequencyIDRef = item.Attributes["href"].Name; } else { paymentFrequency = new Period(item); } } } }
public Mortgage(XmlNode xmlNode) : base(xmlNode) { XmlNode insurerNode = xmlNode.SelectSingleNode("insurer"); if (insurerNode != null) { if (insurerNode.Attributes["href"] != null || insurerNode.Attributes["id"] != null) { if (insurerNode.Attributes["id"] != null) { insurerIDRef_ = insurerNode.Attributes["id"].Value; LegalEntity ob = new LegalEntity(insurerNode); IDManager.SetID(insurerIDRef_, ob); } else if (insurerNode.Attributes["href"] != null) { insurerIDRef_ = insurerNode.Attributes["href"].Value; } else { insurer_ = new LegalEntity(insurerNode); } } else { insurer_ = new LegalEntity(insurerNode); } } XmlNode insurerReferenceNode = xmlNode.SelectSingleNode("insurerReference"); if (insurerReferenceNode != null) { if (insurerReferenceNode.Attributes["href"] != null || insurerReferenceNode.Attributes["id"] != null) { if (insurerReferenceNode.Attributes["id"] != null) { insurerReferenceIDRef_ = insurerReferenceNode.Attributes["id"].Value; LegalEntityReference ob = new LegalEntityReference(insurerReferenceNode); IDManager.SetID(insurerReferenceIDRef_, ob); } else if (insurerReferenceNode.Attributes["href"] != null) { insurerReferenceIDRef_ = insurerReferenceNode.Attributes["href"].Value; } else { insurerReference_ = new LegalEntityReference(insurerReferenceNode); } } else { insurerReference_ = new LegalEntityReference(insurerReferenceNode); } } XmlNode issuerNameNode = xmlNode.SelectSingleNode("issuerName"); if (issuerNameNode != null) { if (issuerNameNode.Attributes["href"] != null || issuerNameNode.Attributes["id"] != null) { if (issuerNameNode.Attributes["id"] != null) { issuerNameIDRef_ = issuerNameNode.Attributes["id"].Value; XsdTypeString ob = new XsdTypeString(issuerNameNode); IDManager.SetID(issuerNameIDRef_, ob); } else if (issuerNameNode.Attributes["href"] != null) { issuerNameIDRef_ = issuerNameNode.Attributes["href"].Value; } else { issuerName_ = new XsdTypeString(issuerNameNode); } } else { issuerName_ = new XsdTypeString(issuerNameNode); } } XmlNode issuerPartyReferenceNode = xmlNode.SelectSingleNode("issuerPartyReference"); if (issuerPartyReferenceNode != null) { if (issuerPartyReferenceNode.Attributes["href"] != null || issuerPartyReferenceNode.Attributes["id"] != null) { if (issuerPartyReferenceNode.Attributes["id"] != null) { issuerPartyReferenceIDRef_ = issuerPartyReferenceNode.Attributes["id"].Value; PartyReference ob = new PartyReference(issuerPartyReferenceNode); IDManager.SetID(issuerPartyReferenceIDRef_, ob); } else if (issuerPartyReferenceNode.Attributes["href"] != null) { issuerPartyReferenceIDRef_ = issuerPartyReferenceNode.Attributes["href"].Value; } else { issuerPartyReference_ = new PartyReference(issuerPartyReferenceNode); } } else { issuerPartyReference_ = new PartyReference(issuerPartyReferenceNode); } } 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 couponTypeNode = xmlNode.SelectSingleNode("couponType"); if (couponTypeNode != null) { if (couponTypeNode.Attributes["href"] != null || couponTypeNode.Attributes["id"] != null) { if (couponTypeNode.Attributes["id"] != null) { couponTypeIDRef_ = couponTypeNode.Attributes["id"].Value; CouponType ob = new CouponType(couponTypeNode); IDManager.SetID(couponTypeIDRef_, ob); } else if (couponTypeNode.Attributes["href"] != null) { couponTypeIDRef_ = couponTypeNode.Attributes["href"].Value; } else { couponType_ = new CouponType(couponTypeNode); } } else { couponType_ = new CouponType(couponTypeNode); } } XmlNode couponRateNode = xmlNode.SelectSingleNode("couponRate"); if (couponRateNode != null) { if (couponRateNode.Attributes["href"] != null || couponRateNode.Attributes["id"] != null) { if (couponRateNode.Attributes["id"] != null) { couponRateIDRef_ = couponRateNode.Attributes["id"].Value; XsdTypeDecimal ob = new XsdTypeDecimal(couponRateNode); IDManager.SetID(couponRateIDRef_, ob); } else if (couponRateNode.Attributes["href"] != null) { couponRateIDRef_ = couponRateNode.Attributes["href"].Value; } else { couponRate_ = new XsdTypeDecimal(couponRateNode); } } else { couponRate_ = new XsdTypeDecimal(couponRateNode); } } XmlNode maturityNode = xmlNode.SelectSingleNode("maturity"); if (maturityNode != null) { if (maturityNode.Attributes["href"] != null || maturityNode.Attributes["id"] != null) { if (maturityNode.Attributes["id"] != null) { maturityIDRef_ = maturityNode.Attributes["id"].Value; XsdTypeDate ob = new XsdTypeDate(maturityNode); IDManager.SetID(maturityIDRef_, ob); } else if (maturityNode.Attributes["href"] != null) { maturityIDRef_ = maturityNode.Attributes["href"].Value; } else { maturity_ = new XsdTypeDate(maturityNode); } } else { maturity_ = new XsdTypeDate(maturityNode); } } XmlNode paymentFrequencyNode = xmlNode.SelectSingleNode("paymentFrequency"); if (paymentFrequencyNode != null) { if (paymentFrequencyNode.Attributes["href"] != null || paymentFrequencyNode.Attributes["id"] != null) { if (paymentFrequencyNode.Attributes["id"] != null) { paymentFrequencyIDRef_ = paymentFrequencyNode.Attributes["id"].Value; Period ob = new Period(paymentFrequencyNode); IDManager.SetID(paymentFrequencyIDRef_, ob); } else if (paymentFrequencyNode.Attributes["href"] != null) { paymentFrequencyIDRef_ = paymentFrequencyNode.Attributes["href"].Value; } else { paymentFrequency_ = new Period(paymentFrequencyNode); } } else { paymentFrequency_ = new Period(paymentFrequencyNode); } } XmlNode dayCountFractionNode = xmlNode.SelectSingleNode("dayCountFraction"); if (dayCountFractionNode != null) { if (dayCountFractionNode.Attributes["href"] != null || dayCountFractionNode.Attributes["id"] != null) { if (dayCountFractionNode.Attributes["id"] != null) { dayCountFractionIDRef_ = dayCountFractionNode.Attributes["id"].Value; DayCountFraction ob = new DayCountFraction(dayCountFractionNode); IDManager.SetID(dayCountFractionIDRef_, ob); } else if (dayCountFractionNode.Attributes["href"] != null) { dayCountFractionIDRef_ = dayCountFractionNode.Attributes["href"].Value; } else { dayCountFraction_ = new DayCountFraction(dayCountFractionNode); } } else { dayCountFraction_ = new DayCountFraction(dayCountFractionNode); } } XmlNode originalPrincipalAmountNode = xmlNode.SelectSingleNode("originalPrincipalAmount"); if (originalPrincipalAmountNode != null) { if (originalPrincipalAmountNode.Attributes["href"] != null || originalPrincipalAmountNode.Attributes["id"] != null) { if (originalPrincipalAmountNode.Attributes["id"] != null) { originalPrincipalAmountIDRef_ = originalPrincipalAmountNode.Attributes["id"].Value; XsdTypeDecimal ob = new XsdTypeDecimal(originalPrincipalAmountNode); IDManager.SetID(originalPrincipalAmountIDRef_, ob); } else if (originalPrincipalAmountNode.Attributes["href"] != null) { originalPrincipalAmountIDRef_ = originalPrincipalAmountNode.Attributes["href"].Value; } else { originalPrincipalAmount_ = new XsdTypeDecimal(originalPrincipalAmountNode); } } else { originalPrincipalAmount_ = new XsdTypeDecimal(originalPrincipalAmountNode); } } XmlNode poolNode = xmlNode.SelectSingleNode("pool"); if (poolNode != null) { if (poolNode.Attributes["href"] != null || poolNode.Attributes["id"] != null) { if (poolNode.Attributes["id"] != null) { poolIDRef_ = poolNode.Attributes["id"].Value; AssetPool ob = new AssetPool(poolNode); IDManager.SetID(poolIDRef_, ob); } else if (poolNode.Attributes["href"] != null) { poolIDRef_ = poolNode.Attributes["href"].Value; } else { pool_ = new AssetPool(poolNode); } } else { pool_ = new AssetPool(poolNode); } } XmlNode sectorNode = xmlNode.SelectSingleNode("sector"); if (sectorNode != null) { if (sectorNode.Attributes["href"] != null || sectorNode.Attributes["id"] != null) { if (sectorNode.Attributes["id"] != null) { sectorIDRef_ = sectorNode.Attributes["id"].Value; MortgageSector ob = new MortgageSector(sectorNode); IDManager.SetID(sectorIDRef_, ob); } else if (sectorNode.Attributes["href"] != null) { sectorIDRef_ = sectorNode.Attributes["href"].Value; } else { sector_ = new MortgageSector(sectorNode); } } else { sector_ = new MortgageSector(sectorNode); } } 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; XsdTypeToken ob = new XsdTypeToken(trancheNode); IDManager.SetID(trancheIDRef_, ob); } else if (trancheNode.Attributes["href"] != null) { trancheIDRef_ = trancheNode.Attributes["href"].Value; } else { tranche_ = new XsdTypeToken(trancheNode); } } else { tranche_ = new XsdTypeToken(trancheNode); } } }
public ReferencePair(XmlNode xmlNode) { XmlNodeList referenceEntityNodeList = xmlNode.SelectNodes("referenceEntity"); if (referenceEntityNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in referenceEntityNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { referenceEntityIDRef = item.Attributes["id"].Name; LegalEntity ob = LegalEntity(); IDManager.SetID(referenceEntityIDRef, ob); } else if (item.Attributes.ToString() == "href") { referenceEntityIDRef = item.Attributes["href"].Name; } else { referenceEntity = new LegalEntity(item); } } } XmlNodeList referenceObligationNodeList = xmlNode.SelectNodes("referenceObligation"); if (referenceObligationNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in referenceObligationNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { referenceObligationIDRef = item.Attributes["id"].Name; ReferenceObligation ob = ReferenceObligation(); IDManager.SetID(referenceObligationIDRef, ob); } else if (item.Attributes.ToString() == "href") { referenceObligationIDRef = item.Attributes["href"].Name; } else { referenceObligation = new ReferenceObligation(item); } } } XmlNodeList noReferenceObligationNodeList = xmlNode.SelectNodes("noReferenceObligation"); if (noReferenceObligationNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in noReferenceObligationNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { noReferenceObligationIDRef = item.Attributes["id"].Name; XsdTypeBoolean ob = XsdTypeBoolean(); IDManager.SetID(noReferenceObligationIDRef, ob); } else if (item.Attributes.ToString() == "href") { noReferenceObligationIDRef = item.Attributes["href"].Name; } else { noReferenceObligation = new XsdTypeBoolean(item); } } } XmlNodeList entityTypeNodeList = xmlNode.SelectNodes("entityType"); if (entityTypeNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in entityTypeNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { entityTypeIDRef = item.Attributes["id"].Name; EntityType ob = EntityType(); IDManager.SetID(entityTypeIDRef, ob); } else if (item.Attributes.ToString() == "href") { entityTypeIDRef = item.Attributes["href"].Name; } else { entityType = new EntityType(item); } } } }
public ReferenceObligation(XmlNode xmlNode) { XmlNodeList bondNodeList = xmlNode.SelectNodes("bond"); if (bondNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in bondNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { bondIDRef = item.Attributes["id"].Name; Bond ob = Bond(); IDManager.SetID(bondIDRef, ob); } else if (item.Attributes.ToString() == "href") { bondIDRef = item.Attributes["href"].Name; } else { bond = new Bond(item); } } } XmlNodeList convertibleBondNodeList = xmlNode.SelectNodes("convertibleBond"); if (convertibleBondNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in convertibleBondNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { convertibleBondIDRef = item.Attributes["id"].Name; ConvertibleBond ob = ConvertibleBond(); IDManager.SetID(convertibleBondIDRef, ob); } else if (item.Attributes.ToString() == "href") { convertibleBondIDRef = item.Attributes["href"].Name; } else { convertibleBond = new ConvertibleBond(item); } } } XmlNodeList mortgageNodeList = xmlNode.SelectNodes("mortgage"); if (mortgageNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in mortgageNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { mortgageIDRef = item.Attributes["id"].Name; Mortgage ob = Mortgage(); IDManager.SetID(mortgageIDRef, ob); } else if (item.Attributes.ToString() == "href") { mortgageIDRef = item.Attributes["href"].Name; } else { mortgage = new Mortgage(item); } } } XmlNodeList loanNodeList = xmlNode.SelectNodes("loan"); if (loanNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in loanNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { loanIDRef = item.Attributes["id"].Name; Loan ob = Loan(); IDManager.SetID(loanIDRef, ob); } else if (item.Attributes.ToString() == "href") { loanIDRef = item.Attributes["href"].Name; } else { loan = new Loan(item); } } } XmlNodeList primaryObligorNodeList = xmlNode.SelectNodes("primaryObligor"); if (primaryObligorNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in primaryObligorNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { primaryObligorIDRef = item.Attributes["id"].Name; LegalEntity ob = LegalEntity(); IDManager.SetID(primaryObligorIDRef, ob); } else if (item.Attributes.ToString() == "href") { primaryObligorIDRef = item.Attributes["href"].Name; } else { primaryObligor = new LegalEntity(item); } } } XmlNodeList primaryObligorReferenceNodeList = xmlNode.SelectNodes("primaryObligorReference"); if (primaryObligorReferenceNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in primaryObligorReferenceNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { primaryObligorReferenceIDRef = item.Attributes["id"].Name; LegalEntityReference ob = LegalEntityReference(); IDManager.SetID(primaryObligorReferenceIDRef, ob); } else if (item.Attributes.ToString() == "href") { primaryObligorReferenceIDRef = item.Attributes["href"].Name; } else { primaryObligorReference = new LegalEntityReference(item); } } } XmlNodeList guarantorNodeList = xmlNode.SelectNodes("guarantor"); if (guarantorNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in guarantorNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { guarantorIDRef = item.Attributes["id"].Name; LegalEntity ob = LegalEntity(); IDManager.SetID(guarantorIDRef, ob); } else if (item.Attributes.ToString() == "href") { guarantorIDRef = item.Attributes["href"].Name; } else { guarantor = new LegalEntity(item); } } } XmlNodeList guarantorReferenceNodeList = xmlNode.SelectNodes("guarantorReference"); if (guarantorReferenceNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in guarantorReferenceNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { guarantorReferenceIDRef = item.Attributes["id"].Name; LegalEntityReference ob = LegalEntityReference(); IDManager.SetID(guarantorReferenceIDRef, ob); } else if (item.Attributes.ToString() == "href") { guarantorReferenceIDRef = item.Attributes["href"].Name; } else { guarantorReference = new LegalEntityReference(item); } } } }
public CreditEventNoticeDocument(XmlNode xmlNode) { XmlNodeList affectedTransactionsNodeList = xmlNode.SelectNodes("affectedTransactions"); if (affectedTransactionsNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in affectedTransactionsNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { affectedTransactionsIDRef = item.Attributes["id"].Name; AffectedTransactions ob = AffectedTransactions(); IDManager.SetID(affectedTransactionsIDRef, ob); } else if (item.Attributes.ToString() == "href") { affectedTransactionsIDRef = item.Attributes["href"].Name; } else { affectedTransactions = new AffectedTransactions(item); } } } XmlNodeList referenceEntityNodeList = xmlNode.SelectNodes("referenceEntity"); if (referenceEntityNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in referenceEntityNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { referenceEntityIDRef = item.Attributes["id"].Name; LegalEntity ob = LegalEntity(); IDManager.SetID(referenceEntityIDRef, ob); } else if (item.Attributes.ToString() == "href") { referenceEntityIDRef = item.Attributes["href"].Name; } else { referenceEntity = new LegalEntity(item); } } } XmlNodeList creditEventNodeList = xmlNode.SelectNodes("creditEvent"); if (creditEventNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in creditEventNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { creditEventIDRef = item.Attributes["id"].Name; CreditEvent ob = CreditEvent(); IDManager.SetID(creditEventIDRef, ob); } else if (item.Attributes.ToString() == "href") { creditEventIDRef = item.Attributes["href"].Name; } else { creditEvent = new CreditEvent(item); } } } XmlNodeList bankruptcyNodeList = xmlNode.SelectNodes("bankruptcy"); if (bankruptcyNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in bankruptcyNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { bankruptcyIDRef = item.Attributes["id"].Name; BankruptcyEvent ob = BankruptcyEvent(); IDManager.SetID(bankruptcyIDRef, ob); } else if (item.Attributes.ToString() == "href") { bankruptcyIDRef = item.Attributes["href"].Name; } else { bankruptcy = new BankruptcyEvent(item); } } } XmlNodeList failureToPayNodeList = xmlNode.SelectNodes("failureToPay"); if (failureToPayNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in failureToPayNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { failureToPayIDRef = item.Attributes["id"].Name; FailureToPayEvent ob = FailureToPayEvent(); IDManager.SetID(failureToPayIDRef, ob); } else if (item.Attributes.ToString() == "href") { failureToPayIDRef = item.Attributes["href"].Name; } else { failureToPay = new FailureToPayEvent(item); } } } XmlNodeList obligationAccelerationNodeList = xmlNode.SelectNodes("obligationAcceleration"); if (obligationAccelerationNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in obligationAccelerationNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { obligationAccelerationIDRef = item.Attributes["id"].Name; ObligationAccelerationEvent ob = ObligationAccelerationEvent(); IDManager.SetID(obligationAccelerationIDRef, ob); } else if (item.Attributes.ToString() == "href") { obligationAccelerationIDRef = item.Attributes["href"].Name; } else { obligationAcceleration = new ObligationAccelerationEvent(item); } } } XmlNodeList obligationDefaultNodeList = xmlNode.SelectNodes("obligationDefault"); if (obligationDefaultNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in obligationDefaultNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { obligationDefaultIDRef = item.Attributes["id"].Name; ObligationDefaultEvent ob = ObligationDefaultEvent(); IDManager.SetID(obligationDefaultIDRef, ob); } else if (item.Attributes.ToString() == "href") { obligationDefaultIDRef = item.Attributes["href"].Name; } else { obligationDefault = new ObligationDefaultEvent(item); } } } XmlNodeList repudiationMoratoriumNodeList = xmlNode.SelectNodes("repudiationMoratorium"); if (repudiationMoratoriumNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in repudiationMoratoriumNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { repudiationMoratoriumIDRef = item.Attributes["id"].Name; RepudiationMoratoriumEvent ob = RepudiationMoratoriumEvent(); IDManager.SetID(repudiationMoratoriumIDRef, ob); } else if (item.Attributes.ToString() == "href") { repudiationMoratoriumIDRef = item.Attributes["href"].Name; } else { repudiationMoratorium = new RepudiationMoratoriumEvent(item); } } } XmlNodeList restructuringNodeList = xmlNode.SelectNodes("restructuring"); if (restructuringNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in restructuringNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { restructuringIDRef = item.Attributes["id"].Name; RestructuringEvent ob = RestructuringEvent(); IDManager.SetID(restructuringIDRef, ob); } else if (item.Attributes.ToString() == "href") { restructuringIDRef = item.Attributes["href"].Name; } else { restructuring = new RestructuringEvent(item); } } } XmlNodeList publiclyAvailableInformationNodeList = xmlNode.SelectNodes("publiclyAvailableInformation"); foreach (XmlNode item in publiclyAvailableInformationNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { publiclyAvailableInformationIDRef = item.Attributes["id"].Name; List <Resource> ob = new List <Resource>(); ob.Add(new Resource(item)); IDManager.SetID(publiclyAvailableInformationIDRef, ob); } else if (item.Attributes.ToString() == "href") { publiclyAvailableInformationIDRef = item.Attributes["href"].Name; } else { publiclyAvailableInformation.Add(new Resource(item)); } } } XmlNodeList notifyingPartyReferenceNodeList = xmlNode.SelectNodes("notifyingPartyReference"); if (notifyingPartyReferenceNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in notifyingPartyReferenceNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { notifyingPartyReferenceIDRef = item.Attributes["id"].Name; PartyReference ob = PartyReference(); IDManager.SetID(notifyingPartyReferenceIDRef, ob); } else if (item.Attributes.ToString() == "href") { notifyingPartyReferenceIDRef = item.Attributes["href"].Name; } else { notifyingPartyReference = new PartyReference(item); } } } XmlNodeList notifiedPartyReferenceNodeList = xmlNode.SelectNodes("notifiedPartyReference"); if (notifiedPartyReferenceNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in notifiedPartyReferenceNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { notifiedPartyReferenceIDRef = item.Attributes["id"].Name; PartyReference ob = PartyReference(); IDManager.SetID(notifiedPartyReferenceIDRef, ob); } else if (item.Attributes.ToString() == "href") { notifiedPartyReferenceIDRef = item.Attributes["href"].Name; } else { notifiedPartyReference = new PartyReference(item); } } } XmlNodeList creditEventNoticeDateNodeList = xmlNode.SelectNodes("creditEventNoticeDate"); if (creditEventNoticeDateNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in creditEventNoticeDateNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { creditEventNoticeDateIDRef = item.Attributes["id"].Name; XsdTypeDate ob = XsdTypeDate(); IDManager.SetID(creditEventNoticeDateIDRef, ob); } else if (item.Attributes.ToString() == "href") { creditEventNoticeDateIDRef = item.Attributes["href"].Name; } else { creditEventNoticeDate = new XsdTypeDate(item); } } } XmlNodeList creditEventDateNodeList = xmlNode.SelectNodes("creditEventDate"); if (creditEventDateNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in creditEventDateNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { creditEventDateIDRef = item.Attributes["id"].Name; XsdTypeDate ob = XsdTypeDate(); IDManager.SetID(creditEventDateIDRef, ob); } else if (item.Attributes.ToString() == "href") { creditEventDateIDRef = item.Attributes["href"].Name; } else { creditEventDate = new XsdTypeDate(item); } } } }
public TradeUnderlyer2(XmlNode xmlNode) { XmlNodeList floatingRateNodeList = xmlNode.SelectNodes("floatingRate"); if (floatingRateNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in floatingRateNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { floatingRateIDRef = item.Attributes["id"].Name; FloatingRate ob = FloatingRate(); IDManager.SetID(floatingRateIDRef, ob); } else if (item.Attributes.ToString() == "href") { floatingRateIDRef = item.Attributes["href"].Name; } else { floatingRate = new FloatingRate(item); } } } XmlNodeList fixedRateNodeList = xmlNode.SelectNodes("fixedRate"); if (fixedRateNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in fixedRateNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { fixedRateIDRef = item.Attributes["id"].Name; Schedule ob = Schedule(); IDManager.SetID(fixedRateIDRef, ob); } else if (item.Attributes.ToString() == "href") { fixedRateIDRef = item.Attributes["href"].Name; } else { fixedRate = new Schedule(item); } } } XmlNodeList underlyingAssetNodeList = xmlNode.SelectNodes("underlyingAsset"); if (underlyingAssetNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in underlyingAssetNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { underlyingAssetIDRef = item.Attributes["id"].Name; Asset ob = Asset(); IDManager.SetID(underlyingAssetIDRef, ob); } else if (item.Attributes.ToString() == "href") { underlyingAssetIDRef = item.Attributes["href"].Name; } else { underlyingAsset = new Asset(item); } } } XmlNodeList basketNodeList = xmlNode.SelectNodes("basket"); if (basketNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in basketNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { basketIDRef = item.Attributes["id"].Name; Basket ob = Basket(); IDManager.SetID(basketIDRef, ob); } else if (item.Attributes.ToString() == "href") { basketIDRef = item.Attributes["href"].Name; } else { basket = new Basket(item); } } } XmlNodeList bondNodeList = xmlNode.SelectNodes("bond"); if (bondNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in bondNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { bondIDRef = item.Attributes["id"].Name; Bond ob = Bond(); IDManager.SetID(bondIDRef, ob); } else if (item.Attributes.ToString() == "href") { bondIDRef = item.Attributes["href"].Name; } else { bond = new Bond(item); } } } XmlNodeList cashNodeList = xmlNode.SelectNodes("cash"); if (cashNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in cashNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { cashIDRef = item.Attributes["id"].Name; Cash ob = Cash(); IDManager.SetID(cashIDRef, ob); } else if (item.Attributes.ToString() == "href") { cashIDRef = item.Attributes["href"].Name; } else { cash = new Cash(item); } } } XmlNodeList commodityNodeList = xmlNode.SelectNodes("commodity"); if (commodityNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in commodityNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { commodityIDRef = item.Attributes["id"].Name; Commodity ob = Commodity(); IDManager.SetID(commodityIDRef, ob); } else if (item.Attributes.ToString() == "href") { commodityIDRef = item.Attributes["href"].Name; } else { commodity = new Commodity(item); } } } XmlNodeList convertibleBondNodeList = xmlNode.SelectNodes("convertibleBond"); if (convertibleBondNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in convertibleBondNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { convertibleBondIDRef = item.Attributes["id"].Name; ConvertibleBond ob = ConvertibleBond(); IDManager.SetID(convertibleBondIDRef, ob); } else if (item.Attributes.ToString() == "href") { convertibleBondIDRef = item.Attributes["href"].Name; } else { convertibleBond = new ConvertibleBond(item); } } } XmlNodeList equityNodeList = xmlNode.SelectNodes("equity"); if (equityNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in equityNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { equityIDRef = item.Attributes["id"].Name; EquityAsset ob = EquityAsset(); IDManager.SetID(equityIDRef, ob); } else if (item.Attributes.ToString() == "href") { equityIDRef = item.Attributes["href"].Name; } else { equity = new EquityAsset(item); } } } XmlNodeList exchangeTradedFundNodeList = xmlNode.SelectNodes("exchangeTradedFund"); if (exchangeTradedFundNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in exchangeTradedFundNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { exchangeTradedFundIDRef = item.Attributes["id"].Name; ExchangeTradedFund ob = ExchangeTradedFund(); IDManager.SetID(exchangeTradedFundIDRef, ob); } else if (item.Attributes.ToString() == "href") { exchangeTradedFundIDRef = item.Attributes["href"].Name; } else { exchangeTradedFund = new ExchangeTradedFund(item); } } } XmlNodeList futureNodeList = xmlNode.SelectNodes("future"); if (futureNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in futureNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { futureIDRef = item.Attributes["id"].Name; Future ob = Future(); IDManager.SetID(futureIDRef, ob); } else if (item.Attributes.ToString() == "href") { futureIDRef = item.Attributes["href"].Name; } else { future = new Future(item); } } } XmlNodeList indexNodeList = xmlNode.SelectNodes("index"); if (indexNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in indexNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { indexIDRef = item.Attributes["id"].Name; Index ob = Index(); IDManager.SetID(indexIDRef, ob); } else if (item.Attributes.ToString() == "href") { indexIDRef = item.Attributes["href"].Name; } else { index = new Index(item); } } } XmlNodeList loanNodeList = xmlNode.SelectNodes("loan"); if (loanNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in loanNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { loanIDRef = item.Attributes["id"].Name; Loan ob = Loan(); IDManager.SetID(loanIDRef, ob); } else if (item.Attributes.ToString() == "href") { loanIDRef = item.Attributes["href"].Name; } else { loan = new Loan(item); } } } XmlNodeList mortgageNodeList = xmlNode.SelectNodes("mortgage"); if (mortgageNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in mortgageNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { mortgageIDRef = item.Attributes["id"].Name; Mortgage ob = Mortgage(); IDManager.SetID(mortgageIDRef, ob); } else if (item.Attributes.ToString() == "href") { mortgageIDRef = item.Attributes["href"].Name; } else { mortgage = new Mortgage(item); } } } XmlNodeList mutualFundNodeList = xmlNode.SelectNodes("mutualFund"); if (mutualFundNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in mutualFundNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { mutualFundIDRef = item.Attributes["id"].Name; MutualFund ob = MutualFund(); IDManager.SetID(mutualFundIDRef, ob); } else if (item.Attributes.ToString() == "href") { mutualFundIDRef = item.Attributes["href"].Name; } else { mutualFund = new MutualFund(item); } } } XmlNodeList quotedCurrencyPairNodeList = xmlNode.SelectNodes("quotedCurrencyPair"); if (quotedCurrencyPairNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in quotedCurrencyPairNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { quotedCurrencyPairIDRef = item.Attributes["id"].Name; QuotedCurrencyPair ob = QuotedCurrencyPair(); IDManager.SetID(quotedCurrencyPairIDRef, ob); } else if (item.Attributes.ToString() == "href") { quotedCurrencyPairIDRef = item.Attributes["href"].Name; } else { quotedCurrencyPair = new QuotedCurrencyPair(item); } } } XmlNodeList referenceEntityNodeList = xmlNode.SelectNodes("referenceEntity"); if (referenceEntityNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in referenceEntityNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { referenceEntityIDRef = item.Attributes["id"].Name; LegalEntity ob = LegalEntity(); IDManager.SetID(referenceEntityIDRef, ob); } else if (item.Attributes.ToString() == "href") { referenceEntityIDRef = item.Attributes["href"].Name; } else { referenceEntity = new LegalEntity(item); } } } XmlNodeList payerPartyReferenceNodeList = xmlNode.SelectNodes("payerPartyReference"); if (payerPartyReferenceNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in payerPartyReferenceNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { payerPartyReferenceIDRef = item.Attributes["id"].Name; PartyReference ob = PartyReference(); IDManager.SetID(payerPartyReferenceIDRef, ob); } else if (item.Attributes.ToString() == "href") { payerPartyReferenceIDRef = item.Attributes["href"].Name; } else { payerPartyReference = new PartyReference(item); } } } XmlNodeList payerAccountReferenceNodeList = xmlNode.SelectNodes("payerAccountReference"); if (payerAccountReferenceNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in payerAccountReferenceNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { payerAccountReferenceIDRef = item.Attributes["id"].Name; AccountReference ob = AccountReference(); IDManager.SetID(payerAccountReferenceIDRef, ob); } else if (item.Attributes.ToString() == "href") { payerAccountReferenceIDRef = item.Attributes["href"].Name; } else { payerAccountReference = new AccountReference(item); } } } XmlNodeList receiverPartyReferenceNodeList = xmlNode.SelectNodes("receiverPartyReference"); if (receiverPartyReferenceNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in receiverPartyReferenceNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { receiverPartyReferenceIDRef = item.Attributes["id"].Name; PartyReference ob = PartyReference(); IDManager.SetID(receiverPartyReferenceIDRef, ob); } else if (item.Attributes.ToString() == "href") { receiverPartyReferenceIDRef = item.Attributes["href"].Name; } else { receiverPartyReference = new PartyReference(item); } } } XmlNodeList receiverAccountReferenceNodeList = xmlNode.SelectNodes("receiverAccountReference"); if (receiverAccountReferenceNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in receiverAccountReferenceNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { receiverAccountReferenceIDRef = item.Attributes["id"].Name; AccountReference ob = AccountReference(); IDManager.SetID(receiverAccountReferenceIDRef, ob); } else if (item.Attributes.ToString() == "href") { receiverAccountReferenceIDRef = item.Attributes["href"].Name; } else { receiverAccountReference = new AccountReference(item); } } } }
public Loan(XmlNode xmlNode) : base(xmlNode) { XmlNodeList borrowerNodeList = xmlNode.SelectNodes("borrower"); if (borrowerNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in borrowerNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { borrowerIDRef = item.Attributes["id"].Name; LegalEntity ob = LegalEntity(); IDManager.SetID(borrowerIDRef, ob); } else if (item.Attributes.ToString() == "href") { borrowerIDRef = item.Attributes["href"].Name; } else { borrower = new LegalEntity(item); } } } XmlNodeList borrowerReferenceNodeList = xmlNode.SelectNodes("borrowerReference"); if (borrowerReferenceNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in borrowerReferenceNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { borrowerReferenceIDRef = item.Attributes["id"].Name; LegalEntityReference ob = LegalEntityReference(); IDManager.SetID(borrowerReferenceIDRef, ob); } else if (item.Attributes.ToString() == "href") { borrowerReferenceIDRef = item.Attributes["href"].Name; } else { borrowerReference = new LegalEntityReference(item); } } } XmlNodeList lienNodeList = xmlNode.SelectNodes("lien"); if (lienNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in lienNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { lienIDRef = item.Attributes["id"].Name; Lien ob = Lien(); IDManager.SetID(lienIDRef, ob); } else if (item.Attributes.ToString() == "href") { lienIDRef = item.Attributes["href"].Name; } else { lien = new Lien(item); } } } XmlNodeList facilityTypeNodeList = xmlNode.SelectNodes("facilityType"); if (facilityTypeNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in facilityTypeNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { facilityTypeIDRef = item.Attributes["id"].Name; FacilityType ob = FacilityType(); IDManager.SetID(facilityTypeIDRef, ob); } else if (item.Attributes.ToString() == "href") { facilityTypeIDRef = item.Attributes["href"].Name; } else { facilityType = new FacilityType(item); } } } XmlNodeList maturityNodeList = xmlNode.SelectNodes("maturity"); if (maturityNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in maturityNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { maturityIDRef = item.Attributes["id"].Name; XsdTypeDate ob = XsdTypeDate(); IDManager.SetID(maturityIDRef, ob); } else if (item.Attributes.ToString() == "href") { maturityIDRef = item.Attributes["href"].Name; } else { maturity = new XsdTypeDate(item); } } } XmlNodeList creditAgreementDateNodeList = xmlNode.SelectNodes("creditAgreementDate"); if (creditAgreementDateNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in creditAgreementDateNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { creditAgreementDateIDRef = item.Attributes["id"].Name; XsdTypeDate ob = XsdTypeDate(); IDManager.SetID(creditAgreementDateIDRef, ob); } else if (item.Attributes.ToString() == "href") { creditAgreementDateIDRef = item.Attributes["href"].Name; } else { creditAgreementDate = new XsdTypeDate(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; UnderlyingAssetTranche ob = UnderlyingAssetTranche(); IDManager.SetID(trancheIDRef, ob); } else if (item.Attributes.ToString() == "href") { trancheIDRef = item.Attributes["href"].Name; } else { tranche = new UnderlyingAssetTranche(item); } } } }
public ReferenceInformation(XmlNode xmlNode) { XmlNodeList referenceEntityNodeList = xmlNode.SelectNodes("referenceEntity"); if (referenceEntityNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in referenceEntityNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { referenceEntityIDRef = item.Attributes["id"].Name; LegalEntity ob = LegalEntity(); IDManager.SetID(referenceEntityIDRef, ob); } else if (item.Attributes.ToString() == "href") { referenceEntityIDRef = item.Attributes["href"].Name; } else { referenceEntity = new LegalEntity(item); } } } XmlNodeList referenceObligationNodeList = xmlNode.SelectNodes("referenceObligation"); foreach (XmlNode item in referenceObligationNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { referenceObligationIDRef = item.Attributes["id"].Name; List<ReferenceObligation> ob = new List<ReferenceObligation>(); ob.Add(new ReferenceObligation(item)); IDManager.SetID(referenceObligationIDRef, ob); } else if (item.Attributes.ToString() == "href") { referenceObligationIDRef = item.Attributes["href"].Name; } else { referenceObligation.Add(new ReferenceObligation(item)); } } } XmlNodeList noReferenceObligationNodeList = xmlNode.SelectNodes("noReferenceObligation"); if (noReferenceObligationNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in noReferenceObligationNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { noReferenceObligationIDRef = item.Attributes["id"].Name; XsdTypeBoolean ob = XsdTypeBoolean(); IDManager.SetID(noReferenceObligationIDRef, ob); } else if (item.Attributes.ToString() == "href") { noReferenceObligationIDRef = item.Attributes["href"].Name; } else { noReferenceObligation = new XsdTypeBoolean(item); } } } XmlNodeList unknownReferenceObligationNodeList = xmlNode.SelectNodes("unknownReferenceObligation"); if (unknownReferenceObligationNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in unknownReferenceObligationNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { unknownReferenceObligationIDRef = item.Attributes["id"].Name; XsdTypeBoolean ob = XsdTypeBoolean(); IDManager.SetID(unknownReferenceObligationIDRef, ob); } else if (item.Attributes.ToString() == "href") { unknownReferenceObligationIDRef = item.Attributes["href"].Name; } else { unknownReferenceObligation = new XsdTypeBoolean(item); } } } XmlNodeList allGuaranteesNodeList = xmlNode.SelectNodes("allGuarantees"); if (allGuaranteesNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in allGuaranteesNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { allGuaranteesIDRef = item.Attributes["id"].Name; XsdTypeBoolean ob = XsdTypeBoolean(); IDManager.SetID(allGuaranteesIDRef, ob); } else if (item.Attributes.ToString() == "href") { allGuaranteesIDRef = item.Attributes["href"].Name; } else { allGuarantees = new XsdTypeBoolean(item); } } } XmlNodeList referencePriceNodeList = xmlNode.SelectNodes("referencePrice"); if (referencePriceNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in referencePriceNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { referencePriceIDRef = item.Attributes["id"].Name; XsdTypeDecimal ob = XsdTypeDecimal(); IDManager.SetID(referencePriceIDRef, ob); } else if (item.Attributes.ToString() == "href") { referencePriceIDRef = item.Attributes["href"].Name; } else { referencePrice = new XsdTypeDecimal(item); } } } XmlNodeList referencePolicyNodeList = xmlNode.SelectNodes("referencePolicy"); if (referencePolicyNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in referencePolicyNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { referencePolicyIDRef = item.Attributes["id"].Name; XsdTypeBoolean ob = XsdTypeBoolean(); IDManager.SetID(referencePolicyIDRef, ob); } else if (item.Attributes.ToString() == "href") { referencePolicyIDRef = item.Attributes["href"].Name; } else { referencePolicy = new XsdTypeBoolean(item); } } } XmlNodeList securedListNodeList = xmlNode.SelectNodes("securedList"); if (securedListNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in securedListNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { securedListIDRef = item.Attributes["id"].Name; XsdTypeBoolean ob = XsdTypeBoolean(); IDManager.SetID(securedListIDRef, ob); } else if (item.Attributes.ToString() == "href") { securedListIDRef = item.Attributes["href"].Name; } else { securedList = new XsdTypeBoolean(item); } } } }
public Loan(XmlNode xmlNode) : base(xmlNode) { XmlNode borrowerNode = xmlNode.SelectSingleNode("borrower"); if (borrowerNode != null) { if (borrowerNode.Attributes["href"] != null || borrowerNode.Attributes["id"] != null) { if (borrowerNode.Attributes["id"] != null) { borrowerIDRef_ = borrowerNode.Attributes["id"].Value; LegalEntity ob = new LegalEntity(borrowerNode); IDManager.SetID(borrowerIDRef_, ob); } else if (borrowerNode.Attributes["href"] != null) { borrowerIDRef_ = borrowerNode.Attributes["href"].Value; } else { borrower_ = new LegalEntity(borrowerNode); } } else { borrower_ = new LegalEntity(borrowerNode); } } XmlNode borrowerReferenceNode = xmlNode.SelectSingleNode("borrowerReference"); if (borrowerReferenceNode != null) { if (borrowerReferenceNode.Attributes["href"] != null || borrowerReferenceNode.Attributes["id"] != null) { if (borrowerReferenceNode.Attributes["id"] != null) { borrowerReferenceIDRef_ = borrowerReferenceNode.Attributes["id"].Value; LegalEntityReference ob = new LegalEntityReference(borrowerReferenceNode); IDManager.SetID(borrowerReferenceIDRef_, ob); } else if (borrowerReferenceNode.Attributes["href"] != null) { borrowerReferenceIDRef_ = borrowerReferenceNode.Attributes["href"].Value; } else { borrowerReference_ = new LegalEntityReference(borrowerReferenceNode); } } else { borrowerReference_ = new LegalEntityReference(borrowerReferenceNode); } } XmlNode lienNode = xmlNode.SelectSingleNode("lien"); if (lienNode != null) { if (lienNode.Attributes["href"] != null || lienNode.Attributes["id"] != null) { if (lienNode.Attributes["id"] != null) { lienIDRef_ = lienNode.Attributes["id"].Value; Lien ob = new Lien(lienNode); IDManager.SetID(lienIDRef_, ob); } else if (lienNode.Attributes["href"] != null) { lienIDRef_ = lienNode.Attributes["href"].Value; } else { lien_ = new Lien(lienNode); } } else { lien_ = new Lien(lienNode); } } XmlNode facilityTypeNode = xmlNode.SelectSingleNode("facilityType"); if (facilityTypeNode != null) { if (facilityTypeNode.Attributes["href"] != null || facilityTypeNode.Attributes["id"] != null) { if (facilityTypeNode.Attributes["id"] != null) { facilityTypeIDRef_ = facilityTypeNode.Attributes["id"].Value; FacilityType ob = new FacilityType(facilityTypeNode); IDManager.SetID(facilityTypeIDRef_, ob); } else if (facilityTypeNode.Attributes["href"] != null) { facilityTypeIDRef_ = facilityTypeNode.Attributes["href"].Value; } else { facilityType_ = new FacilityType(facilityTypeNode); } } else { facilityType_ = new FacilityType(facilityTypeNode); } } XmlNode maturityNode = xmlNode.SelectSingleNode("maturity"); if (maturityNode != null) { if (maturityNode.Attributes["href"] != null || maturityNode.Attributes["id"] != null) { if (maturityNode.Attributes["id"] != null) { maturityIDRef_ = maturityNode.Attributes["id"].Value; XsdTypeDate ob = new XsdTypeDate(maturityNode); IDManager.SetID(maturityIDRef_, ob); } else if (maturityNode.Attributes["href"] != null) { maturityIDRef_ = maturityNode.Attributes["href"].Value; } else { maturity_ = new XsdTypeDate(maturityNode); } } else { maturity_ = new XsdTypeDate(maturityNode); } } XmlNode creditAgreementDateNode = xmlNode.SelectSingleNode("creditAgreementDate"); if (creditAgreementDateNode != null) { if (creditAgreementDateNode.Attributes["href"] != null || creditAgreementDateNode.Attributes["id"] != null) { if (creditAgreementDateNode.Attributes["id"] != null) { creditAgreementDateIDRef_ = creditAgreementDateNode.Attributes["id"].Value; XsdTypeDate ob = new XsdTypeDate(creditAgreementDateNode); IDManager.SetID(creditAgreementDateIDRef_, ob); } else if (creditAgreementDateNode.Attributes["href"] != null) { creditAgreementDateIDRef_ = creditAgreementDateNode.Attributes["href"].Value; } else { creditAgreementDate_ = new XsdTypeDate(creditAgreementDateNode); } } else { creditAgreementDate_ = new XsdTypeDate(creditAgreementDateNode); } } 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; UnderlyingAssetTranche ob = new UnderlyingAssetTranche(trancheNode); IDManager.SetID(trancheIDRef_, ob); } else if (trancheNode.Attributes["href"] != null) { trancheIDRef_ = trancheNode.Attributes["href"].Value; } else { tranche_ = new UnderlyingAssetTranche(trancheNode); } } else { tranche_ = new UnderlyingAssetTranche(trancheNode); } } }
public ReferenceInformation(XmlNode xmlNode) { XmlNodeList referenceEntityNodeList = xmlNode.SelectNodes("referenceEntity"); if (referenceEntityNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in referenceEntityNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { referenceEntityIDRef = item.Attributes["id"].Name; LegalEntity ob = LegalEntity(); IDManager.SetID(referenceEntityIDRef, ob); } else if (item.Attributes.ToString() == "href") { referenceEntityIDRef = item.Attributes["href"].Name; } else { referenceEntity = new LegalEntity(item); } } } XmlNodeList referenceObligationNodeList = xmlNode.SelectNodes("referenceObligation"); foreach (XmlNode item in referenceObligationNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { referenceObligationIDRef = item.Attributes["id"].Name; List <ReferenceObligation> ob = new List <ReferenceObligation>(); ob.Add(new ReferenceObligation(item)); IDManager.SetID(referenceObligationIDRef, ob); } else if (item.Attributes.ToString() == "href") { referenceObligationIDRef = item.Attributes["href"].Name; } else { referenceObligation.Add(new ReferenceObligation(item)); } } } XmlNodeList noReferenceObligationNodeList = xmlNode.SelectNodes("noReferenceObligation"); if (noReferenceObligationNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in noReferenceObligationNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { noReferenceObligationIDRef = item.Attributes["id"].Name; XsdTypeBoolean ob = XsdTypeBoolean(); IDManager.SetID(noReferenceObligationIDRef, ob); } else if (item.Attributes.ToString() == "href") { noReferenceObligationIDRef = item.Attributes["href"].Name; } else { noReferenceObligation = new XsdTypeBoolean(item); } } } XmlNodeList unknownReferenceObligationNodeList = xmlNode.SelectNodes("unknownReferenceObligation"); if (unknownReferenceObligationNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in unknownReferenceObligationNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { unknownReferenceObligationIDRef = item.Attributes["id"].Name; XsdTypeBoolean ob = XsdTypeBoolean(); IDManager.SetID(unknownReferenceObligationIDRef, ob); } else if (item.Attributes.ToString() == "href") { unknownReferenceObligationIDRef = item.Attributes["href"].Name; } else { unknownReferenceObligation = new XsdTypeBoolean(item); } } } XmlNodeList allGuaranteesNodeList = xmlNode.SelectNodes("allGuarantees"); if (allGuaranteesNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in allGuaranteesNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { allGuaranteesIDRef = item.Attributes["id"].Name; XsdTypeBoolean ob = XsdTypeBoolean(); IDManager.SetID(allGuaranteesIDRef, ob); } else if (item.Attributes.ToString() == "href") { allGuaranteesIDRef = item.Attributes["href"].Name; } else { allGuarantees = new XsdTypeBoolean(item); } } } XmlNodeList referencePriceNodeList = xmlNode.SelectNodes("referencePrice"); if (referencePriceNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in referencePriceNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { referencePriceIDRef = item.Attributes["id"].Name; XsdTypeDecimal ob = XsdTypeDecimal(); IDManager.SetID(referencePriceIDRef, ob); } else if (item.Attributes.ToString() == "href") { referencePriceIDRef = item.Attributes["href"].Name; } else { referencePrice = new XsdTypeDecimal(item); } } } XmlNodeList referencePolicyNodeList = xmlNode.SelectNodes("referencePolicy"); if (referencePolicyNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in referencePolicyNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { referencePolicyIDRef = item.Attributes["id"].Name; XsdTypeBoolean ob = XsdTypeBoolean(); IDManager.SetID(referencePolicyIDRef, ob); } else if (item.Attributes.ToString() == "href") { referencePolicyIDRef = item.Attributes["href"].Name; } else { referencePolicy = new XsdTypeBoolean(item); } } } XmlNodeList securedListNodeList = xmlNode.SelectNodes("securedList"); if (securedListNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in securedListNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { securedListIDRef = item.Attributes["id"].Name; XsdTypeBoolean ob = XsdTypeBoolean(); IDManager.SetID(securedListIDRef, ob); } else if (item.Attributes.ToString() == "href") { securedListIDRef = item.Attributes["href"].Name; } else { securedList = new XsdTypeBoolean(item); } } } }
public SimpleCreditDefaultSwap(XmlNode xmlNode) : base(xmlNode) { XmlNodeList referenceEntityNodeList = xmlNode.SelectNodes("referenceEntity"); if (referenceEntityNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in referenceEntityNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { referenceEntityIDRef = item.Attributes["id"].Name; LegalEntity ob = LegalEntity(); IDManager.SetID(referenceEntityIDRef, ob); } else if (item.Attributes.ToString() == "href") { referenceEntityIDRef = item.Attributes["href"].Name; } else { referenceEntity = new LegalEntity(item); } } } XmlNodeList creditEntityReferenceNodeList = xmlNode.SelectNodes("creditEntityReference"); if (creditEntityReferenceNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in creditEntityReferenceNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { creditEntityReferenceIDRef = item.Attributes["id"].Name; LegalEntityReference ob = LegalEntityReference(); IDManager.SetID(creditEntityReferenceIDRef, ob); } else if (item.Attributes.ToString() == "href") { creditEntityReferenceIDRef = item.Attributes["href"].Name; } else { creditEntityReference = new LegalEntityReference(item); } } } 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; Period ob = Period(); IDManager.SetID(termIDRef, ob); } else if (item.Attributes.ToString() == "href") { termIDRef = item.Attributes["href"].Name; } else { term = new Period(item); } } } XmlNodeList paymentFrequencyNodeList = xmlNode.SelectNodes("paymentFrequency"); if (paymentFrequencyNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in paymentFrequencyNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { paymentFrequencyIDRef = item.Attributes["id"].Name; Period ob = Period(); IDManager.SetID(paymentFrequencyIDRef, ob); } else if (item.Attributes.ToString() == "href") { paymentFrequencyIDRef = item.Attributes["href"].Name; } else { paymentFrequency = new Period(item); } } } }
public ReferenceObligation(XmlNode xmlNode) { XmlNodeList bondNodeList = xmlNode.SelectNodes("bond"); if (bondNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in bondNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { bondIDRef = item.Attributes["id"].Name; Bond ob = Bond(); IDManager.SetID(bondIDRef, ob); } else if (item.Attributes.ToString() == "href") { bondIDRef = item.Attributes["href"].Name; } else { bond = new Bond(item); } } } XmlNodeList convertibleBondNodeList = xmlNode.SelectNodes("convertibleBond"); if (convertibleBondNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in convertibleBondNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { convertibleBondIDRef = item.Attributes["id"].Name; ConvertibleBond ob = ConvertibleBond(); IDManager.SetID(convertibleBondIDRef, ob); } else if (item.Attributes.ToString() == "href") { convertibleBondIDRef = item.Attributes["href"].Name; } else { convertibleBond = new ConvertibleBond(item); } } } XmlNodeList mortgageNodeList = xmlNode.SelectNodes("mortgage"); if (mortgageNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in mortgageNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { mortgageIDRef = item.Attributes["id"].Name; Mortgage ob = Mortgage(); IDManager.SetID(mortgageIDRef, ob); } else if (item.Attributes.ToString() == "href") { mortgageIDRef = item.Attributes["href"].Name; } else { mortgage = new Mortgage(item); } } } XmlNodeList loanNodeList = xmlNode.SelectNodes("loan"); if (loanNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in loanNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { loanIDRef = item.Attributes["id"].Name; Loan ob = Loan(); IDManager.SetID(loanIDRef, ob); } else if (item.Attributes.ToString() == "href") { loanIDRef = item.Attributes["href"].Name; } else { loan = new Loan(item); } } } XmlNodeList primaryObligorNodeList = xmlNode.SelectNodes("primaryObligor"); if (primaryObligorNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in primaryObligorNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { primaryObligorIDRef = item.Attributes["id"].Name; LegalEntity ob = LegalEntity(); IDManager.SetID(primaryObligorIDRef, ob); } else if (item.Attributes.ToString() == "href") { primaryObligorIDRef = item.Attributes["href"].Name; } else { primaryObligor = new LegalEntity(item); } } } XmlNodeList primaryObligorReferenceNodeList = xmlNode.SelectNodes("primaryObligorReference"); if (primaryObligorReferenceNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in primaryObligorReferenceNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { primaryObligorReferenceIDRef = item.Attributes["id"].Name; LegalEntityReference ob = LegalEntityReference(); IDManager.SetID(primaryObligorReferenceIDRef, ob); } else if (item.Attributes.ToString() == "href") { primaryObligorReferenceIDRef = item.Attributes["href"].Name; } else { primaryObligorReference = new LegalEntityReference(item); } } } XmlNodeList guarantorNodeList = xmlNode.SelectNodes("guarantor"); if (guarantorNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in guarantorNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { guarantorIDRef = item.Attributes["id"].Name; LegalEntity ob = LegalEntity(); IDManager.SetID(guarantorIDRef, ob); } else if (item.Attributes.ToString() == "href") { guarantorIDRef = item.Attributes["href"].Name; } else { guarantor = new LegalEntity(item); } } } XmlNodeList guarantorReferenceNodeList = xmlNode.SelectNodes("guarantorReference"); if (guarantorReferenceNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in guarantorReferenceNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { guarantorReferenceIDRef = item.Attributes["id"].Name; LegalEntityReference ob = LegalEntityReference(); IDManager.SetID(guarantorReferenceIDRef, ob); } else if (item.Attributes.ToString() == "href") { guarantorReferenceIDRef = item.Attributes["href"].Name; } else { guarantorReference = new LegalEntityReference(item); } } } }
public CreditEventNoticeDocument(XmlNode xmlNode) { XmlNodeList affectedTransactionsNodeList = xmlNode.SelectNodes("affectedTransactions"); if (affectedTransactionsNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in affectedTransactionsNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { affectedTransactionsIDRef = item.Attributes["id"].Name; AffectedTransactions ob = AffectedTransactions(); IDManager.SetID(affectedTransactionsIDRef, ob); } else if (item.Attributes.ToString() == "href") { affectedTransactionsIDRef = item.Attributes["href"].Name; } else { affectedTransactions = new AffectedTransactions(item); } } } XmlNodeList referenceEntityNodeList = xmlNode.SelectNodes("referenceEntity"); if (referenceEntityNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in referenceEntityNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { referenceEntityIDRef = item.Attributes["id"].Name; LegalEntity ob = LegalEntity(); IDManager.SetID(referenceEntityIDRef, ob); } else if (item.Attributes.ToString() == "href") { referenceEntityIDRef = item.Attributes["href"].Name; } else { referenceEntity = new LegalEntity(item); } } } XmlNodeList creditEventNodeList = xmlNode.SelectNodes("creditEvent"); if (creditEventNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in creditEventNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { creditEventIDRef = item.Attributes["id"].Name; CreditEvent ob = CreditEvent(); IDManager.SetID(creditEventIDRef, ob); } else if (item.Attributes.ToString() == "href") { creditEventIDRef = item.Attributes["href"].Name; } else { creditEvent = new CreditEvent(item); } } } XmlNodeList bankruptcyNodeList = xmlNode.SelectNodes("bankruptcy"); if (bankruptcyNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in bankruptcyNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { bankruptcyIDRef = item.Attributes["id"].Name; BankruptcyEvent ob = BankruptcyEvent(); IDManager.SetID(bankruptcyIDRef, ob); } else if (item.Attributes.ToString() == "href") { bankruptcyIDRef = item.Attributes["href"].Name; } else { bankruptcy = new BankruptcyEvent(item); } } } XmlNodeList failureToPayNodeList = xmlNode.SelectNodes("failureToPay"); if (failureToPayNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in failureToPayNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { failureToPayIDRef = item.Attributes["id"].Name; FailureToPayEvent ob = FailureToPayEvent(); IDManager.SetID(failureToPayIDRef, ob); } else if (item.Attributes.ToString() == "href") { failureToPayIDRef = item.Attributes["href"].Name; } else { failureToPay = new FailureToPayEvent(item); } } } XmlNodeList obligationAccelerationNodeList = xmlNode.SelectNodes("obligationAcceleration"); if (obligationAccelerationNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in obligationAccelerationNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { obligationAccelerationIDRef = item.Attributes["id"].Name; ObligationAccelerationEvent ob = ObligationAccelerationEvent(); IDManager.SetID(obligationAccelerationIDRef, ob); } else if (item.Attributes.ToString() == "href") { obligationAccelerationIDRef = item.Attributes["href"].Name; } else { obligationAcceleration = new ObligationAccelerationEvent(item); } } } XmlNodeList obligationDefaultNodeList = xmlNode.SelectNodes("obligationDefault"); if (obligationDefaultNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in obligationDefaultNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { obligationDefaultIDRef = item.Attributes["id"].Name; ObligationDefaultEvent ob = ObligationDefaultEvent(); IDManager.SetID(obligationDefaultIDRef, ob); } else if (item.Attributes.ToString() == "href") { obligationDefaultIDRef = item.Attributes["href"].Name; } else { obligationDefault = new ObligationDefaultEvent(item); } } } XmlNodeList repudiationMoratoriumNodeList = xmlNode.SelectNodes("repudiationMoratorium"); if (repudiationMoratoriumNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in repudiationMoratoriumNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { repudiationMoratoriumIDRef = item.Attributes["id"].Name; RepudiationMoratoriumEvent ob = RepudiationMoratoriumEvent(); IDManager.SetID(repudiationMoratoriumIDRef, ob); } else if (item.Attributes.ToString() == "href") { repudiationMoratoriumIDRef = item.Attributes["href"].Name; } else { repudiationMoratorium = new RepudiationMoratoriumEvent(item); } } } XmlNodeList restructuringNodeList = xmlNode.SelectNodes("restructuring"); if (restructuringNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in restructuringNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { restructuringIDRef = item.Attributes["id"].Name; RestructuringEvent ob = RestructuringEvent(); IDManager.SetID(restructuringIDRef, ob); } else if (item.Attributes.ToString() == "href") { restructuringIDRef = item.Attributes["href"].Name; } else { restructuring = new RestructuringEvent(item); } } } XmlNodeList publiclyAvailableInformationNodeList = xmlNode.SelectNodes("publiclyAvailableInformation"); foreach (XmlNode item in publiclyAvailableInformationNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { publiclyAvailableInformationIDRef = item.Attributes["id"].Name; List<Resource> ob = new List<Resource>(); ob.Add(new Resource(item)); IDManager.SetID(publiclyAvailableInformationIDRef, ob); } else if (item.Attributes.ToString() == "href") { publiclyAvailableInformationIDRef = item.Attributes["href"].Name; } else { publiclyAvailableInformation.Add(new Resource(item)); } } } XmlNodeList notifyingPartyReferenceNodeList = xmlNode.SelectNodes("notifyingPartyReference"); if (notifyingPartyReferenceNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in notifyingPartyReferenceNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { notifyingPartyReferenceIDRef = item.Attributes["id"].Name; PartyReference ob = PartyReference(); IDManager.SetID(notifyingPartyReferenceIDRef, ob); } else if (item.Attributes.ToString() == "href") { notifyingPartyReferenceIDRef = item.Attributes["href"].Name; } else { notifyingPartyReference = new PartyReference(item); } } } XmlNodeList notifiedPartyReferenceNodeList = xmlNode.SelectNodes("notifiedPartyReference"); if (notifiedPartyReferenceNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in notifiedPartyReferenceNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { notifiedPartyReferenceIDRef = item.Attributes["id"].Name; PartyReference ob = PartyReference(); IDManager.SetID(notifiedPartyReferenceIDRef, ob); } else if (item.Attributes.ToString() == "href") { notifiedPartyReferenceIDRef = item.Attributes["href"].Name; } else { notifiedPartyReference = new PartyReference(item); } } } XmlNodeList creditEventNoticeDateNodeList = xmlNode.SelectNodes("creditEventNoticeDate"); if (creditEventNoticeDateNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in creditEventNoticeDateNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { creditEventNoticeDateIDRef = item.Attributes["id"].Name; XsdTypeDate ob = XsdTypeDate(); IDManager.SetID(creditEventNoticeDateIDRef, ob); } else if (item.Attributes.ToString() == "href") { creditEventNoticeDateIDRef = item.Attributes["href"].Name; } else { creditEventNoticeDate = new XsdTypeDate(item); } } } XmlNodeList creditEventDateNodeList = xmlNode.SelectNodes("creditEventDate"); if (creditEventDateNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in creditEventDateNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { creditEventDateIDRef = item.Attributes["id"].Name; XsdTypeDate ob = XsdTypeDate(); IDManager.SetID(creditEventDateIDRef, ob); } else if (item.Attributes.ToString() == "href") { creditEventDateIDRef = item.Attributes["href"].Name; } else { creditEventDate = new XsdTypeDate(item); } } } }
public ReferenceInformation(XmlNode 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); } } XmlNodeList referenceObligationNodeList = xmlNode.SelectNodes("referenceObligation"); if (referenceObligationNodeList != null) { this.referenceObligation_ = new List <ReferenceObligation>(); foreach (XmlNode item in referenceObligationNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] != null) { if (item.Attributes["id"] != null) { referenceObligationIDRef_ = item.Attributes["id"].Value; referenceObligation_.Add(new ReferenceObligation(item)); IDManager.SetID(referenceObligationIDRef_, referenceObligation_[referenceObligation_.Count - 1]); } else if (item.Attributes["href"] != null) { referenceObligationIDRef_ = item.Attributes["href"].Value; } else { referenceObligation_.Add(new ReferenceObligation(item)); } } else { referenceObligation_.Add(new ReferenceObligation(item)); } } } XmlNode noReferenceObligationNode = xmlNode.SelectSingleNode("noReferenceObligation"); if (noReferenceObligationNode != null) { if (noReferenceObligationNode.Attributes["href"] != null || noReferenceObligationNode.Attributes["id"] != null) { if (noReferenceObligationNode.Attributes["id"] != null) { noReferenceObligationIDRef_ = noReferenceObligationNode.Attributes["id"].Value; XsdTypeBoolean ob = new XsdTypeBoolean(noReferenceObligationNode); IDManager.SetID(noReferenceObligationIDRef_, ob); } else if (noReferenceObligationNode.Attributes["href"] != null) { noReferenceObligationIDRef_ = noReferenceObligationNode.Attributes["href"].Value; } else { noReferenceObligation_ = new XsdTypeBoolean(noReferenceObligationNode); } } else { noReferenceObligation_ = new XsdTypeBoolean(noReferenceObligationNode); } } XmlNode unknownReferenceObligationNode = xmlNode.SelectSingleNode("unknownReferenceObligation"); if (unknownReferenceObligationNode != null) { if (unknownReferenceObligationNode.Attributes["href"] != null || unknownReferenceObligationNode.Attributes["id"] != null) { if (unknownReferenceObligationNode.Attributes["id"] != null) { unknownReferenceObligationIDRef_ = unknownReferenceObligationNode.Attributes["id"].Value; XsdTypeBoolean ob = new XsdTypeBoolean(unknownReferenceObligationNode); IDManager.SetID(unknownReferenceObligationIDRef_, ob); } else if (unknownReferenceObligationNode.Attributes["href"] != null) { unknownReferenceObligationIDRef_ = unknownReferenceObligationNode.Attributes["href"].Value; } else { unknownReferenceObligation_ = new XsdTypeBoolean(unknownReferenceObligationNode); } } else { unknownReferenceObligation_ = new XsdTypeBoolean(unknownReferenceObligationNode); } } XmlNode allGuaranteesNode = xmlNode.SelectSingleNode("allGuarantees"); if (allGuaranteesNode != null) { if (allGuaranteesNode.Attributes["href"] != null || allGuaranteesNode.Attributes["id"] != null) { if (allGuaranteesNode.Attributes["id"] != null) { allGuaranteesIDRef_ = allGuaranteesNode.Attributes["id"].Value; XsdTypeBoolean ob = new XsdTypeBoolean(allGuaranteesNode); IDManager.SetID(allGuaranteesIDRef_, ob); } else if (allGuaranteesNode.Attributes["href"] != null) { allGuaranteesIDRef_ = allGuaranteesNode.Attributes["href"].Value; } else { allGuarantees_ = new XsdTypeBoolean(allGuaranteesNode); } } else { allGuarantees_ = new XsdTypeBoolean(allGuaranteesNode); } } XmlNode referencePriceNode = xmlNode.SelectSingleNode("referencePrice"); if (referencePriceNode != null) { if (referencePriceNode.Attributes["href"] != null || referencePriceNode.Attributes["id"] != null) { if (referencePriceNode.Attributes["id"] != null) { referencePriceIDRef_ = referencePriceNode.Attributes["id"].Value; XsdTypeDecimal ob = new XsdTypeDecimal(referencePriceNode); IDManager.SetID(referencePriceIDRef_, ob); } else if (referencePriceNode.Attributes["href"] != null) { referencePriceIDRef_ = referencePriceNode.Attributes["href"].Value; } else { referencePrice_ = new XsdTypeDecimal(referencePriceNode); } } else { referencePrice_ = new XsdTypeDecimal(referencePriceNode); } } XmlNode referencePolicyNode = xmlNode.SelectSingleNode("referencePolicy"); if (referencePolicyNode != null) { if (referencePolicyNode.Attributes["href"] != null || referencePolicyNode.Attributes["id"] != null) { if (referencePolicyNode.Attributes["id"] != null) { referencePolicyIDRef_ = referencePolicyNode.Attributes["id"].Value; XsdTypeBoolean ob = new XsdTypeBoolean(referencePolicyNode); IDManager.SetID(referencePolicyIDRef_, ob); } else if (referencePolicyNode.Attributes["href"] != null) { referencePolicyIDRef_ = referencePolicyNode.Attributes["href"].Value; } else { referencePolicy_ = new XsdTypeBoolean(referencePolicyNode); } } else { referencePolicy_ = new XsdTypeBoolean(referencePolicyNode); } } XmlNode securedListNode = xmlNode.SelectSingleNode("securedList"); if (securedListNode != null) { if (securedListNode.Attributes["href"] != null || securedListNode.Attributes["id"] != null) { if (securedListNode.Attributes["id"] != null) { securedListIDRef_ = securedListNode.Attributes["id"].Value; XsdTypeBoolean ob = new XsdTypeBoolean(securedListNode); IDManager.SetID(securedListIDRef_, ob); } else if (securedListNode.Attributes["href"] != null) { securedListIDRef_ = securedListNode.Attributes["href"].Value; } else { securedList_ = new XsdTypeBoolean(securedListNode); } } else { securedList_ = new XsdTypeBoolean(securedListNode); } } }