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