public StreetAddress(XmlNode xmlNode) { XmlNodeList streetLineNodeList = xmlNode.SelectNodes("streetLine"); foreach (XmlNode item in streetLineNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { streetLineIDRef = item.Attributes["id"].Name; XsdTypeString ob = new XsdTypeString(); ob.Add(new XsdTypeString(item)); IDManager.SetID(streetLineIDRef, ob); } else if (item.Attributes.ToString() == "href") { streetLineIDRef = item.Attributes["href"].Name; } else { streetLine.Add(new XsdTypeString(item)); } } } }
public YieldCurve(XmlNode xmlNode) : base(xmlNode) { XmlNodeList algorithmNodeList = xmlNode.SelectNodes("algorithm"); if (algorithmNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in algorithmNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { algorithmIDRef = item.Attributes["id"].Name; XsdTypeString ob = XsdTypeString(); IDManager.SetID(algorithmIDRef, ob); } else if (item.Attributes.ToString() == "href") { algorithmIDRef = item.Attributes["href"].Name; } else { algorithm = new XsdTypeString(item); } } } XmlNodeList forecastRateIndexNodeList = xmlNode.SelectNodes("forecastRateIndex"); if (forecastRateIndexNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in forecastRateIndexNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { forecastRateIndexIDRef = item.Attributes["id"].Name; ForecastRateIndex ob = ForecastRateIndex(); IDManager.SetID(forecastRateIndexIDRef, ob); } else if (item.Attributes.ToString() == "href") { forecastRateIndexIDRef = item.Attributes["href"].Name; } else { forecastRateIndex = new ForecastRateIndex(item); } } } }
public LoanParticipation(XmlNode xmlNode) : base(xmlNode) { XmlNode qualifyingParticipationSellerNode = xmlNode.SelectSingleNode("qualifyingParticipationSeller"); if (qualifyingParticipationSellerNode != null) { if (qualifyingParticipationSellerNode.Attributes["href"] != null || qualifyingParticipationSellerNode.Attributes["id"] != null) { if (qualifyingParticipationSellerNode.Attributes["id"] != null) { qualifyingParticipationSellerIDRef_ = qualifyingParticipationSellerNode.Attributes["id"].Value; XsdTypeString ob = new XsdTypeString(qualifyingParticipationSellerNode); IDManager.SetID(qualifyingParticipationSellerIDRef_, ob); } else if (qualifyingParticipationSellerNode.Attributes["href"] != null) { qualifyingParticipationSellerIDRef_ = qualifyingParticipationSellerNode.Attributes["href"].Value; } else { qualifyingParticipationSeller_ = new XsdTypeString(qualifyingParticipationSellerNode); } } else { qualifyingParticipationSeller_ = new XsdTypeString(qualifyingParticipationSellerNode); } } }
public MutualFund(XmlNode xmlNode) : base(xmlNode) { XmlNode openEndedFundNode = xmlNode.SelectSingleNode("openEndedFund"); if (openEndedFundNode != null) { if (openEndedFundNode.Attributes["href"] != null || openEndedFundNode.Attributes["id"] != null) { if (openEndedFundNode.Attributes["id"] != null) { openEndedFundIDRef_ = openEndedFundNode.Attributes["id"].Value; XsdTypeBoolean ob = new XsdTypeBoolean(openEndedFundNode); IDManager.SetID(openEndedFundIDRef_, ob); } else if (openEndedFundNode.Attributes["href"] != null) { openEndedFundIDRef_ = openEndedFundNode.Attributes["href"].Value; } else { openEndedFund_ = new XsdTypeBoolean(openEndedFundNode); } } else { openEndedFund_ = new XsdTypeBoolean(openEndedFundNode); } } XmlNode fundManagerNode = xmlNode.SelectSingleNode("fundManager"); if (fundManagerNode != null) { if (fundManagerNode.Attributes["href"] != null || fundManagerNode.Attributes["id"] != null) { if (fundManagerNode.Attributes["id"] != null) { fundManagerIDRef_ = fundManagerNode.Attributes["id"].Value; XsdTypeString ob = new XsdTypeString(fundManagerNode); IDManager.SetID(fundManagerIDRef_, ob); } else if (fundManagerNode.Attributes["href"] != null) { fundManagerIDRef_ = fundManagerNode.Attributes["href"].Value; } else { fundManager_ = new XsdTypeString(fundManagerNode); } } else { fundManager_ = new XsdTypeString(fundManagerNode); } } }
public MutualFund(XmlNode xmlNode) : base(xmlNode) { XmlNodeList openEndedFundNodeList = xmlNode.SelectNodes("openEndedFund"); if (openEndedFundNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in openEndedFundNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { openEndedFundIDRef = item.Attributes["id"].Name; XsdTypeBoolean ob = XsdTypeBoolean(); IDManager.SetID(openEndedFundIDRef, ob); } else if (item.Attributes.ToString() == "href") { openEndedFundIDRef = item.Attributes["href"].Name; } else { openEndedFund = new XsdTypeBoolean(item); } } } XmlNodeList fundManagerNodeList = xmlNode.SelectNodes("fundManager"); if (fundManagerNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in fundManagerNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { fundManagerIDRef = item.Attributes["id"].Name; XsdTypeString ob = XsdTypeString(); IDManager.SetID(fundManagerIDRef, ob); } else if (item.Attributes.ToString() == "href") { fundManagerIDRef = item.Attributes["href"].Name; } else { fundManager = new XsdTypeString(item); } } } }
public YieldCurve(XmlNode xmlNode) : base(xmlNode) { XmlNode algorithmNode = xmlNode.SelectSingleNode("algorithm"); if (algorithmNode != null) { if (algorithmNode.Attributes["href"] != null || algorithmNode.Attributes["id"] != null) { if (algorithmNode.Attributes["id"] != null) { algorithmIDRef_ = algorithmNode.Attributes["id"].Value; XsdTypeString ob = new XsdTypeString(algorithmNode); IDManager.SetID(algorithmIDRef_, ob); } else if (algorithmNode.Attributes["href"] != null) { algorithmIDRef_ = algorithmNode.Attributes["href"].Value; } else { algorithm_ = new XsdTypeString(algorithmNode); } } else { algorithm_ = new XsdTypeString(algorithmNode); } } XmlNode forecastRateIndexNode = xmlNode.SelectSingleNode("forecastRateIndex"); if (forecastRateIndexNode != null) { if (forecastRateIndexNode.Attributes["href"] != null || forecastRateIndexNode.Attributes["id"] != null) { if (forecastRateIndexNode.Attributes["id"] != null) { forecastRateIndexIDRef_ = forecastRateIndexNode.Attributes["id"].Value; ForecastRateIndex ob = new ForecastRateIndex(forecastRateIndexNode); IDManager.SetID(forecastRateIndexIDRef_, ob); } else if (forecastRateIndexNode.Attributes["href"] != null) { forecastRateIndexIDRef_ = forecastRateIndexNode.Attributes["href"].Value; } else { forecastRateIndex_ = new ForecastRateIndex(forecastRateIndexNode); } } else { forecastRateIndex_ = new ForecastRateIndex(forecastRateIndexNode); } } }
public ExchangeTradedFund(XmlNode xmlNode) : base(xmlNode) { XmlNode fundManagerNode = xmlNode.SelectSingleNode("fundManager"); if (fundManagerNode != null) { if (fundManagerNode.Attributes["href"] != null || fundManagerNode.Attributes["id"] != null) { if (fundManagerNode.Attributes["id"] != null) { fundManagerIDRef_ = fundManagerNode.Attributes["id"].Value; XsdTypeString ob = new XsdTypeString(fundManagerNode); IDManager.SetID(fundManagerIDRef_, ob); } else if (fundManagerNode.Attributes["href"] != null) { fundManagerIDRef_ = fundManagerNode.Attributes["href"].Value; } else { fundManager_ = new XsdTypeString(fundManagerNode); } } else { fundManager_ = new XsdTypeString(fundManagerNode); } } }
public LoanParticipation(XmlNode xmlNode) : base(xmlNode) { XmlNodeList qualifyingParticipationSellerNodeList = xmlNode.SelectNodes("qualifyingParticipationSeller"); if (qualifyingParticipationSellerNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in qualifyingParticipationSellerNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { qualifyingParticipationSellerIDRef = item.Attributes["id"].Name; XsdTypeString ob = XsdTypeString(); IDManager.SetID(qualifyingParticipationSellerIDRef, ob); } else if (item.Attributes.ToString() == "href") { qualifyingParticipationSellerIDRef = item.Attributes["href"].Name; } else { qualifyingParticipationSeller = new XsdTypeString(item); } } } }
public ReferenceBank(XmlNode xmlNode) { XmlNode referenceBankIdNode = xmlNode.SelectSingleNode("referenceBankId"); if (referenceBankIdNode != null) { if (referenceBankIdNode.Attributes["href"] != null || referenceBankIdNode.Attributes["id"] != null) { if (referenceBankIdNode.Attributes["id"] != null) { referenceBankIdIDRef_ = referenceBankIdNode.Attributes["id"].Value; ReferenceBankId ob = new ReferenceBankId(referenceBankIdNode); IDManager.SetID(referenceBankIdIDRef_, ob); } else if (referenceBankIdNode.Attributes["href"] != null) { referenceBankIdIDRef_ = referenceBankIdNode.Attributes["href"].Value; } else { referenceBankId_ = new ReferenceBankId(referenceBankIdNode); } } else { referenceBankId_ = new ReferenceBankId(referenceBankIdNode); } } XmlNode referenceBankNameNode = xmlNode.SelectSingleNode("referenceBankName"); if (referenceBankNameNode != null) { if (referenceBankNameNode.Attributes["href"] != null || referenceBankNameNode.Attributes["id"] != null) { if (referenceBankNameNode.Attributes["id"] != null) { referenceBankNameIDRef_ = referenceBankNameNode.Attributes["id"].Value; XsdTypeString ob = new XsdTypeString(referenceBankNameNode); IDManager.SetID(referenceBankNameIDRef_, ob); } else if (referenceBankNameNode.Attributes["href"] != null) { referenceBankNameIDRef_ = referenceBankNameNode.Attributes["href"].Value; } else { referenceBankName_ = new XsdTypeString(referenceBankNameNode); } } else { referenceBankName_ = new XsdTypeString(referenceBankNameNode); } } }
public FormulaComponent(XmlNode xmlNode) { XmlNodeList componentDescriptionNodeList = xmlNode.SelectNodes("componentDescription"); if (componentDescriptionNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in componentDescriptionNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { componentDescriptionIDRef = item.Attributes["id"].Name; XsdTypeString ob = XsdTypeString(); IDManager.SetID(componentDescriptionIDRef, ob); } else if (item.Attributes.ToString() == "href") { componentDescriptionIDRef = item.Attributes["href"].Name; } else { componentDescription = new XsdTypeString(item); } } } XmlNodeList formulaNodeList = xmlNode.SelectNodes("formula"); if (formulaNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in formulaNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { formulaIDRef = item.Attributes["id"].Name; Formula ob = Formula(); IDManager.SetID(formulaIDRef, ob); } else if (item.Attributes.ToString() == "href") { formulaIDRef = item.Attributes["href"].Name; } else { formula = new Formula(item); } } } }
public ReferenceBank(XmlNode xmlNode) { XmlNodeList referenceBankIdNodeList = xmlNode.SelectNodes("referenceBankId"); if (referenceBankIdNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in referenceBankIdNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { referenceBankIdIDRef = item.Attributes["id"].Name; ReferenceBankId ob = ReferenceBankId(); IDManager.SetID(referenceBankIdIDRef, ob); } else if (item.Attributes.ToString() == "href") { referenceBankIdIDRef = item.Attributes["href"].Name; } else { referenceBankId = new ReferenceBankId(item); } } } XmlNodeList referenceBankNameNodeList = xmlNode.SelectNodes("referenceBankName"); if (referenceBankNameNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in referenceBankNameNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { referenceBankNameIDRef = item.Attributes["id"].Name; XsdTypeString ob = XsdTypeString(); IDManager.SetID(referenceBankNameIDRef, ob); } else if (item.Attributes.ToString() == "href") { referenceBankNameIDRef = item.Attributes["href"].Name; } else { referenceBankName = new XsdTypeString(item); } } } }
public TelephoneNumber(XmlNode xmlNode) { XmlNodeList typeNodeList = xmlNode.SelectNodes("type"); if (typeNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in typeNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { typeIDRef = item.Attributes["id"].Name; TelephoneTypeEnum ob = TelephoneTypeEnum(); IDManager.SetID(typeIDRef, ob); } else if (item.Attributes.ToString() == "href") { typeIDRef = item.Attributes["href"].Name; } else { type = new TelephoneTypeEnum(item); } } } XmlNodeList numberNodeList = xmlNode.SelectNodes("number"); if (numberNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in numberNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { numberIDRef = item.Attributes["id"].Name; XsdTypeString ob = XsdTypeString(); IDManager.SetID(numberIDRef, ob); } else if (item.Attributes.ToString() == "href") { numberIDRef = item.Attributes["href"].Name; } else { number = new XsdTypeString(item); } } } }
public FormulaComponent(XmlNode xmlNode) { XmlNode componentDescriptionNode = xmlNode.SelectSingleNode("componentDescription"); if (componentDescriptionNode != null) { if (componentDescriptionNode.Attributes["href"] != null || componentDescriptionNode.Attributes["id"] != null) { if (componentDescriptionNode.Attributes["id"] != null) { componentDescriptionIDRef_ = componentDescriptionNode.Attributes["id"].Value; XsdTypeString ob = new XsdTypeString(componentDescriptionNode); IDManager.SetID(componentDescriptionIDRef_, ob); } else if (componentDescriptionNode.Attributes["href"] != null) { componentDescriptionIDRef_ = componentDescriptionNode.Attributes["href"].Value; } else { componentDescription_ = new XsdTypeString(componentDescriptionNode); } } else { componentDescription_ = new XsdTypeString(componentDescriptionNode); } } XmlNode formulaNode = xmlNode.SelectSingleNode("formula"); if (formulaNode != null) { if (formulaNode.Attributes["href"] != null || formulaNode.Attributes["id"] != null) { if (formulaNode.Attributes["id"] != null) { formulaIDRef_ = formulaNode.Attributes["id"].Value; Formula ob = new Formula(formulaNode); IDManager.SetID(formulaIDRef_, ob); } else if (formulaNode.Attributes["href"] != null) { formulaIDRef_ = formulaNode.Attributes["href"].Value; } else { formula_ = new Formula(formulaNode); } } else { formula_ = new Formula(formulaNode); } } }
public TelephoneNumber(XmlNode xmlNode) { XmlNode typeNode = xmlNode.SelectSingleNode("type"); if (typeNode != null) { if (typeNode.Attributes["href"] != null || typeNode.Attributes["id"] != null) { if (typeNode.Attributes["id"] != null) { typeIDRef_ = typeNode.Attributes["id"].Value; TelephoneTypeEnum ob = new TelephoneTypeEnum(typeNode); IDManager.SetID(typeIDRef_, ob); } else if (typeNode.Attributes["href"] != null) { typeIDRef_ = typeNode.Attributes["href"].Value; } else { type_ = new TelephoneTypeEnum(typeNode); } } else { type_ = new TelephoneTypeEnum(typeNode); } } XmlNode numberNode = xmlNode.SelectSingleNode("number"); if (numberNode != null) { if (numberNode.Attributes["href"] != null || numberNode.Attributes["id"] != null) { if (numberNode.Attributes["id"] != null) { numberIDRef_ = numberNode.Attributes["id"].Value; XsdTypeString ob = new XsdTypeString(numberNode); IDManager.SetID(numberIDRef_, ob); } else if (numberNode.Attributes["href"] != null) { numberIDRef_ = numberNode.Attributes["href"].Value; } else { number_ = new XsdTypeString(numberNode); } } else { number_ = new XsdTypeString(numberNode); } } }
public IdentifiedAsset(XmlNode xmlNode) : base(xmlNode) { XmlNodeList instrumentIdNodeList = xmlNode.SelectNodes("instrumentId"); foreach (XmlNode item in instrumentIdNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { instrumentIdIDRef = item.Attributes["id"].Name; List <InstrumentId> ob = new List <InstrumentId>(); ob.Add(new InstrumentId(item)); IDManager.SetID(instrumentIdIDRef, ob); } else if (item.Attributes.ToString() == "href") { instrumentIdIDRef = item.Attributes["href"].Name; } else { instrumentId.Add(new InstrumentId(item)); } } } XmlNodeList descriptionNodeList = xmlNode.SelectNodes("description"); if (descriptionNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in descriptionNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { descriptionIDRef = item.Attributes["id"].Name; XsdTypeString ob = XsdTypeString(); IDManager.SetID(descriptionIDRef, ob); } else if (item.Attributes.ToString() == "href") { descriptionIDRef = item.Attributes["href"].Name; } else { description = new XsdTypeString(item); } } } }
public AdditionalData(XmlNode xmlNode) { XmlNode mimeTypeNode = xmlNode.SelectSingleNode("mimeType"); if (mimeTypeNode != null) { if (mimeTypeNode.Attributes["href"] != null || mimeTypeNode.Attributes["id"] != null) { if (mimeTypeNode.Attributes["id"] != null) { mimeTypeIDRef_ = mimeTypeNode.Attributes["id"].Value; MimeType ob = new MimeType(mimeTypeNode); IDManager.SetID(mimeTypeIDRef_, ob); } else if (mimeTypeNode.Attributes["href"] != null) { mimeTypeIDRef_ = mimeTypeNode.Attributes["href"].Value; } else { mimeType_ = new MimeType(mimeTypeNode); } } else { mimeType_ = new MimeType(mimeTypeNode); } } XmlNode stringNode = xmlNode.SelectSingleNode("string"); if (stringNode != null) { if (stringNode.Attributes["href"] != null || stringNode.Attributes["id"] != null) { if (stringNode.Attributes["id"] != null) { stringIDRef_ = stringNode.Attributes["id"].Value; XsdTypeString ob = new XsdTypeString(stringNode); IDManager.SetID(stringIDRef_, ob); } else if (stringNode.Attributes["href"] != null) { stringIDRef_ = stringNode.Attributes["href"].Value; } else { string_ = new XsdTypeString(stringNode); } } else { string_ = new XsdTypeString(stringNode); } } XmlNode hexadecimalBinaryNode = xmlNode.SelectSingleNode("hexadecimalBinary"); if (hexadecimalBinaryNode != null) { if (hexadecimalBinaryNode.Attributes["href"] != null || hexadecimalBinaryNode.Attributes["id"] != null) { if (hexadecimalBinaryNode.Attributes["id"] != null) { hexadecimalBinaryIDRef_ = hexadecimalBinaryNode.Attributes["id"].Value; XsdTypeHexBinary ob = new XsdTypeHexBinary(hexadecimalBinaryNode); IDManager.SetID(hexadecimalBinaryIDRef_, ob); } else if (hexadecimalBinaryNode.Attributes["href"] != null) { hexadecimalBinaryIDRef_ = hexadecimalBinaryNode.Attributes["href"].Value; } else { hexadecimalBinary_ = new XsdTypeHexBinary(hexadecimalBinaryNode); } } else { hexadecimalBinary_ = new XsdTypeHexBinary(hexadecimalBinaryNode); } } XmlNode base64BinaryNode = xmlNode.SelectSingleNode("base64Binary"); if (base64BinaryNode != null) { if (base64BinaryNode.Attributes["href"] != null || base64BinaryNode.Attributes["id"] != null) { if (base64BinaryNode.Attributes["id"] != null) { base64BinaryIDRef_ = base64BinaryNode.Attributes["id"].Value; XsdTypeBase64Binary ob = new XsdTypeBase64Binary(base64BinaryNode); IDManager.SetID(base64BinaryIDRef_, ob); } else if (base64BinaryNode.Attributes["href"] != null) { base64BinaryIDRef_ = base64BinaryNode.Attributes["href"].Value; } else { base64Binary_ = new XsdTypeBase64Binary(base64BinaryNode); } } else { base64Binary_ = new XsdTypeBase64Binary(base64BinaryNode); } } XmlNode originalMessageNode = xmlNode.SelectSingleNode("originalMessage"); if (originalMessageNode != null) { if (originalMessageNode.Attributes["href"] != null || originalMessageNode.Attributes["id"] != null) { if (originalMessageNode.Attributes["id"] != null) { originalMessageIDRef_ = originalMessageNode.Attributes["id"].Value; XsdTypeBoolean ob = new XsdTypeBoolean(originalMessageNode); IDManager.SetID(originalMessageIDRef_, ob); } else if (originalMessageNode.Attributes["href"] != null) { originalMessageIDRef_ = originalMessageNode.Attributes["href"].Value; } else { originalMessage_ = new XsdTypeBoolean(originalMessageNode); } } else { originalMessage_ = new XsdTypeBoolean(originalMessageNode); } } }
public ExternalDocument(XmlNode xmlNode) { XmlNode mimeTypeNode = xmlNode.SelectSingleNode("mimeType"); if (mimeTypeNode != null) { if (mimeTypeNode.Attributes["href"] != null || mimeTypeNode.Attributes["id"] != null) { if (mimeTypeNode.Attributes["id"] != null) { mimeTypeIDRef_ = mimeTypeNode.Attributes["id"].Value; MimeType ob = new MimeType(mimeTypeNode); IDManager.SetID(mimeTypeIDRef_, ob); } else if (mimeTypeNode.Attributes["href"] != null) { mimeTypeIDRef_ = mimeTypeNode.Attributes["href"].Value; } else { mimeType_ = new MimeType(mimeTypeNode); } } else { mimeType_ = new MimeType(mimeTypeNode); } } XmlNode stringNode = xmlNode.SelectSingleNode("string"); if (stringNode != null) { if (stringNode.Attributes["href"] != null || stringNode.Attributes["id"] != null) { if (stringNode.Attributes["id"] != null) { stringIDRef_ = stringNode.Attributes["id"].Value; XsdTypeString ob = new XsdTypeString(stringNode); IDManager.SetID(stringIDRef_, ob); } else if (stringNode.Attributes["href"] != null) { stringIDRef_ = stringNode.Attributes["href"].Value; } else { string_ = new XsdTypeString(stringNode); } } else { string_ = new XsdTypeString(stringNode); } } XmlNode hexadecimalBinaryNode = xmlNode.SelectSingleNode("hexadecimalBinary"); if (hexadecimalBinaryNode != null) { if (hexadecimalBinaryNode.Attributes["href"] != null || hexadecimalBinaryNode.Attributes["id"] != null) { if (hexadecimalBinaryNode.Attributes["id"] != null) { hexadecimalBinaryIDRef_ = hexadecimalBinaryNode.Attributes["id"].Value; XsdTypeHexBinary ob = new XsdTypeHexBinary(hexadecimalBinaryNode); IDManager.SetID(hexadecimalBinaryIDRef_, ob); } else if (hexadecimalBinaryNode.Attributes["href"] != null) { hexadecimalBinaryIDRef_ = hexadecimalBinaryNode.Attributes["href"].Value; } else { hexadecimalBinary_ = new XsdTypeHexBinary(hexadecimalBinaryNode); } } else { hexadecimalBinary_ = new XsdTypeHexBinary(hexadecimalBinaryNode); } } XmlNode base64BinaryNode = xmlNode.SelectSingleNode("base64Binary"); if (base64BinaryNode != null) { if (base64BinaryNode.Attributes["href"] != null || base64BinaryNode.Attributes["id"] != null) { if (base64BinaryNode.Attributes["id"] != null) { base64BinaryIDRef_ = base64BinaryNode.Attributes["id"].Value; XsdTypeBase64Binary ob = new XsdTypeBase64Binary(base64BinaryNode); IDManager.SetID(base64BinaryIDRef_, ob); } else if (base64BinaryNode.Attributes["href"] != null) { base64BinaryIDRef_ = base64BinaryNode.Attributes["href"].Value; } else { base64Binary_ = new XsdTypeBase64Binary(base64BinaryNode); } } else { base64Binary_ = new XsdTypeBase64Binary(base64BinaryNode); } } XmlNode urlNode = xmlNode.SelectSingleNode("url"); if (urlNode != null) { if (urlNode.Attributes["href"] != null || urlNode.Attributes["id"] != null) { if (urlNode.Attributes["id"] != null) { urlIDRef_ = urlNode.Attributes["id"].Value; XsdTypeAnyURI ob = new XsdTypeAnyURI(urlNode); IDManager.SetID(urlIDRef_, ob); } else if (urlNode.Attributes["href"] != null) { urlIDRef_ = urlNode.Attributes["href"].Value; } else { url_ = new XsdTypeAnyURI(urlNode); } } else { url_ = new XsdTypeAnyURI(urlNode); } } XmlNode attachmentReferenceNode = xmlNode.SelectSingleNode("attachmentReference"); if (attachmentReferenceNode != null) { if (attachmentReferenceNode.Attributes["href"] != null || attachmentReferenceNode.Attributes["id"] != null) { if (attachmentReferenceNode.Attributes["id"] != null) { attachmentReferenceIDRef_ = attachmentReferenceNode.Attributes["id"].Value; HTTPAttachmentReference ob = new HTTPAttachmentReference(attachmentReferenceNode); IDManager.SetID(attachmentReferenceIDRef_, ob); } else if (attachmentReferenceNode.Attributes["href"] != null) { attachmentReferenceIDRef_ = attachmentReferenceNode.Attributes["href"].Value; } else { attachmentReference_ = new HTTPAttachmentReference(attachmentReferenceNode); } } else { attachmentReference_ = new HTTPAttachmentReference(attachmentReferenceNode); } } }
public Bond(XmlNode xmlNode) : base(xmlNode) { 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 parValueNode = xmlNode.SelectSingleNode("parValue"); if (parValueNode != null) { if (parValueNode.Attributes["href"] != null || parValueNode.Attributes["id"] != null) { if (parValueNode.Attributes["id"] != null) { parValueIDRef_ = parValueNode.Attributes["id"].Value; XsdTypeDecimal ob = new XsdTypeDecimal(parValueNode); IDManager.SetID(parValueIDRef_, ob); } else if (parValueNode.Attributes["href"] != null) { parValueIDRef_ = parValueNode.Attributes["href"].Value; } else { parValue_ = new XsdTypeDecimal(parValueNode); } } else { parValue_ = new XsdTypeDecimal(parValueNode); } } XmlNode faceAmountNode = xmlNode.SelectSingleNode("faceAmount"); if (faceAmountNode != null) { if (faceAmountNode.Attributes["href"] != null || faceAmountNode.Attributes["id"] != null) { if (faceAmountNode.Attributes["id"] != null) { faceAmountIDRef_ = faceAmountNode.Attributes["id"].Value; XsdTypeDecimal ob = new XsdTypeDecimal(faceAmountNode); IDManager.SetID(faceAmountIDRef_, ob); } else if (faceAmountNode.Attributes["href"] != null) { faceAmountIDRef_ = faceAmountNode.Attributes["href"].Value; } else { faceAmount_ = new XsdTypeDecimal(faceAmountNode); } } else { faceAmount_ = new XsdTypeDecimal(faceAmountNode); } } 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); } } }
public SensitivityDefinition(XmlNode xmlNode) { XmlNodeList nameNodeList = xmlNode.SelectNodes("name"); if (nameNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in nameNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { nameIDRef = item.Attributes["id"].Name; XsdTypeString ob = XsdTypeString(); IDManager.SetID(nameIDRef, ob); } else if (item.Attributes.ToString() == "href") { nameIDRef = item.Attributes["href"].Name; } else { name = new XsdTypeString(item); } } } XmlNodeList valuationScenarioReferenceNodeList = xmlNode.SelectNodes("valuationScenarioReference"); if (valuationScenarioReferenceNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in valuationScenarioReferenceNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { valuationScenarioReferenceIDRef = item.Attributes["id"].Name; ValuationScenarioReference ob = ValuationScenarioReference(); IDManager.SetID(valuationScenarioReferenceIDRef, ob); } else if (item.Attributes.ToString() == "href") { valuationScenarioReferenceIDRef = item.Attributes["href"].Name; } else { valuationScenarioReference = new ValuationScenarioReference(item); } } } XmlNodeList partialDerivativeNodeList = xmlNode.SelectNodes("partialDerivative"); foreach (XmlNode item in partialDerivativeNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { partialDerivativeIDRef = item.Attributes["id"].Name; List <PricingParameterDerivative> ob = new List <PricingParameterDerivative>(); ob.Add(new PricingParameterDerivative(item)); IDManager.SetID(partialDerivativeIDRef, ob); } else if (item.Attributes.ToString() == "href") { partialDerivativeIDRef = item.Attributes["href"].Name; } else { partialDerivative.Add(new PricingParameterDerivative(item)); } } } XmlNodeList formulaNodeList = xmlNode.SelectNodes("formula"); if (formulaNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in formulaNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { formulaIDRef = item.Attributes["id"].Name; DerivativeFormula ob = DerivativeFormula(); IDManager.SetID(formulaIDRef, ob); } else if (item.Attributes.ToString() == "href") { formulaIDRef = item.Attributes["href"].Name; } else { formula = new DerivativeFormula(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; TimeDimension ob = TimeDimension(); IDManager.SetID(termIDRef, ob); } else if (item.Attributes.ToString() == "href") { termIDRef = item.Attributes["href"].Name; } else { term = new TimeDimension(item); } } } XmlNodeList coordinateNodeList = xmlNode.SelectNodes("coordinate"); if (coordinateNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in coordinateNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { coordinateIDRef = item.Attributes["id"].Name; PricingDataPointCoordinate ob = PricingDataPointCoordinate(); IDManager.SetID(coordinateIDRef, ob); } else if (item.Attributes.ToString() == "href") { coordinateIDRef = item.Attributes["href"].Name; } else { coordinate = new PricingDataPointCoordinate(item); } } } XmlNodeList coordinateReferenceNodeList = xmlNode.SelectNodes("coordinateReference"); if (coordinateReferenceNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in coordinateReferenceNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { coordinateReferenceIDRef = item.Attributes["id"].Name; PricingDataPointCoordinateReference ob = PricingDataPointCoordinateReference(); IDManager.SetID(coordinateReferenceIDRef, ob); } else if (item.Attributes.ToString() == "href") { coordinateReferenceIDRef = item.Attributes["href"].Name; } else { coordinateReference = new PricingDataPointCoordinateReference(item); } } } }
public Resource(XmlNode xmlNode) { XmlNode resourceIdNode = xmlNode.SelectSingleNode("resourceId"); if (resourceIdNode != null) { if (resourceIdNode.Attributes["href"] != null || resourceIdNode.Attributes["id"] != null) { if (resourceIdNode.Attributes["id"] != null) { resourceIdIDRef_ = resourceIdNode.Attributes["id"].Value; ResourceId ob = new ResourceId(resourceIdNode); IDManager.SetID(resourceIdIDRef_, ob); } else if (resourceIdNode.Attributes["href"] != null) { resourceIdIDRef_ = resourceIdNode.Attributes["href"].Value; } else { resourceId_ = new ResourceId(resourceIdNode); } } else { resourceId_ = new ResourceId(resourceIdNode); } } XmlNode resourceTypeNode = xmlNode.SelectSingleNode("resourceType"); if (resourceTypeNode != null) { if (resourceTypeNode.Attributes["href"] != null || resourceTypeNode.Attributes["id"] != null) { if (resourceTypeNode.Attributes["id"] != null) { resourceTypeIDRef_ = resourceTypeNode.Attributes["id"].Value; ResourceType ob = new ResourceType(resourceTypeNode); IDManager.SetID(resourceTypeIDRef_, ob); } else if (resourceTypeNode.Attributes["href"] != null) { resourceTypeIDRef_ = resourceTypeNode.Attributes["href"].Value; } else { resourceType_ = new ResourceType(resourceTypeNode); } } else { resourceType_ = new ResourceType(resourceTypeNode); } } XmlNode languageNode = xmlNode.SelectSingleNode("language"); if (languageNode != null) { if (languageNode.Attributes["href"] != null || languageNode.Attributes["id"] != null) { if (languageNode.Attributes["id"] != null) { languageIDRef_ = languageNode.Attributes["id"].Value; Language ob = new Language(languageNode); IDManager.SetID(languageIDRef_, ob); } else if (languageNode.Attributes["href"] != null) { languageIDRef_ = languageNode.Attributes["href"].Value; } else { language_ = new Language(languageNode); } } else { language_ = new Language(languageNode); } } XmlNode sizeInBytesNode = xmlNode.SelectSingleNode("sizeInBytes"); if (sizeInBytesNode != null) { if (sizeInBytesNode.Attributes["href"] != null || sizeInBytesNode.Attributes["id"] != null) { if (sizeInBytesNode.Attributes["id"] != null) { sizeInBytesIDRef_ = sizeInBytesNode.Attributes["id"].Value; XsdTypeDecimal ob = new XsdTypeDecimal(sizeInBytesNode); IDManager.SetID(sizeInBytesIDRef_, ob); } else if (sizeInBytesNode.Attributes["href"] != null) { sizeInBytesIDRef_ = sizeInBytesNode.Attributes["href"].Value; } else { sizeInBytes_ = new XsdTypeDecimal(sizeInBytesNode); } } else { sizeInBytes_ = new XsdTypeDecimal(sizeInBytesNode); } } XmlNode lengthNode = xmlNode.SelectSingleNode("length"); if (lengthNode != null) { if (lengthNode.Attributes["href"] != null || lengthNode.Attributes["id"] != null) { if (lengthNode.Attributes["id"] != null) { lengthIDRef_ = lengthNode.Attributes["id"].Value; ResourceLength ob = new ResourceLength(lengthNode); IDManager.SetID(lengthIDRef_, ob); } else if (lengthNode.Attributes["href"] != null) { lengthIDRef_ = lengthNode.Attributes["href"].Value; } else { length_ = new ResourceLength(lengthNode); } } else { length_ = new ResourceLength(lengthNode); } } XmlNode mimeTypeNode = xmlNode.SelectSingleNode("mimeType"); if (mimeTypeNode != null) { if (mimeTypeNode.Attributes["href"] != null || mimeTypeNode.Attributes["id"] != null) { if (mimeTypeNode.Attributes["id"] != null) { mimeTypeIDRef_ = mimeTypeNode.Attributes["id"].Value; MimeType ob = new MimeType(mimeTypeNode); IDManager.SetID(mimeTypeIDRef_, ob); } else if (mimeTypeNode.Attributes["href"] != null) { mimeTypeIDRef_ = mimeTypeNode.Attributes["href"].Value; } else { mimeType_ = new MimeType(mimeTypeNode); } } else { mimeType_ = new MimeType(mimeTypeNode); } } XmlNode nameNode = xmlNode.SelectSingleNode("name"); if (nameNode != null) { if (nameNode.Attributes["href"] != null || nameNode.Attributes["id"] != null) { if (nameNode.Attributes["id"] != null) { nameIDRef_ = nameNode.Attributes["id"].Value; XsdTypeNormalizedString ob = new XsdTypeNormalizedString(nameNode); IDManager.SetID(nameIDRef_, ob); } else if (nameNode.Attributes["href"] != null) { nameIDRef_ = nameNode.Attributes["href"].Value; } else { name_ = new XsdTypeNormalizedString(nameNode); } } else { name_ = new XsdTypeNormalizedString(nameNode); } } XmlNode commentsNode = xmlNode.SelectSingleNode("comments"); if (commentsNode != null) { if (commentsNode.Attributes["href"] != null || commentsNode.Attributes["id"] != null) { if (commentsNode.Attributes["id"] != null) { commentsIDRef_ = commentsNode.Attributes["id"].Value; XsdTypeString ob = new XsdTypeString(commentsNode); IDManager.SetID(commentsIDRef_, ob); } else if (commentsNode.Attributes["href"] != null) { commentsIDRef_ = commentsNode.Attributes["href"].Value; } else { comments_ = new XsdTypeString(commentsNode); } } else { comments_ = new XsdTypeString(commentsNode); } } XmlNode stringNode = xmlNode.SelectSingleNode("string"); if (stringNode != null) { if (stringNode.Attributes["href"] != null || stringNode.Attributes["id"] != null) { if (stringNode.Attributes["id"] != null) { stringIDRef_ = stringNode.Attributes["id"].Value; XsdTypeString ob = new XsdTypeString(stringNode); IDManager.SetID(stringIDRef_, ob); } else if (stringNode.Attributes["href"] != null) { stringIDRef_ = stringNode.Attributes["href"].Value; } else { string_ = new XsdTypeString(stringNode); } } else { string_ = new XsdTypeString(stringNode); } } XmlNode hexadecimalBinaryNode = xmlNode.SelectSingleNode("hexadecimalBinary"); if (hexadecimalBinaryNode != null) { if (hexadecimalBinaryNode.Attributes["href"] != null || hexadecimalBinaryNode.Attributes["id"] != null) { if (hexadecimalBinaryNode.Attributes["id"] != null) { hexadecimalBinaryIDRef_ = hexadecimalBinaryNode.Attributes["id"].Value; XsdTypeHexBinary ob = new XsdTypeHexBinary(hexadecimalBinaryNode); IDManager.SetID(hexadecimalBinaryIDRef_, ob); } else if (hexadecimalBinaryNode.Attributes["href"] != null) { hexadecimalBinaryIDRef_ = hexadecimalBinaryNode.Attributes["href"].Value; } else { hexadecimalBinary_ = new XsdTypeHexBinary(hexadecimalBinaryNode); } } else { hexadecimalBinary_ = new XsdTypeHexBinary(hexadecimalBinaryNode); } } XmlNode base64BinaryNode = xmlNode.SelectSingleNode("base64Binary"); if (base64BinaryNode != null) { if (base64BinaryNode.Attributes["href"] != null || base64BinaryNode.Attributes["id"] != null) { if (base64BinaryNode.Attributes["id"] != null) { base64BinaryIDRef_ = base64BinaryNode.Attributes["id"].Value; XsdTypeBase64Binary ob = new XsdTypeBase64Binary(base64BinaryNode); IDManager.SetID(base64BinaryIDRef_, ob); } else if (base64BinaryNode.Attributes["href"] != null) { base64BinaryIDRef_ = base64BinaryNode.Attributes["href"].Value; } else { base64Binary_ = new XsdTypeBase64Binary(base64BinaryNode); } } else { base64Binary_ = new XsdTypeBase64Binary(base64BinaryNode); } } XmlNode urlNode = xmlNode.SelectSingleNode("url"); if (urlNode != null) { if (urlNode.Attributes["href"] != null || urlNode.Attributes["id"] != null) { if (urlNode.Attributes["id"] != null) { urlIDRef_ = urlNode.Attributes["id"].Value; XsdTypeAnyURI ob = new XsdTypeAnyURI(urlNode); IDManager.SetID(urlIDRef_, ob); } else if (urlNode.Attributes["href"] != null) { urlIDRef_ = urlNode.Attributes["href"].Value; } else { url_ = new XsdTypeAnyURI(urlNode); } } else { url_ = new XsdTypeAnyURI(urlNode); } } }
public PricingParameterDerivative(XmlNode xmlNode) { XmlNode descriptionNode = xmlNode.SelectSingleNode("description"); if (descriptionNode != null) { if (descriptionNode.Attributes["href"] != null || descriptionNode.Attributes["id"] != null) { if (descriptionNode.Attributes["id"] != null) { descriptionIDRef_ = descriptionNode.Attributes["id"].Value; XsdTypeString ob = new XsdTypeString(descriptionNode); IDManager.SetID(descriptionIDRef_, ob); } else if (descriptionNode.Attributes["href"] != null) { descriptionIDRef_ = descriptionNode.Attributes["href"].Value; } else { description_ = new XsdTypeString(descriptionNode); } } else { description_ = new XsdTypeString(descriptionNode); } } XmlNode parameterReferenceNode = xmlNode.SelectSingleNode("parameterReference"); if (parameterReferenceNode != null) { if (parameterReferenceNode.Attributes["href"] != null || parameterReferenceNode.Attributes["id"] != null) { if (parameterReferenceNode.Attributes["id"] != null) { parameterReferenceIDRef_ = parameterReferenceNode.Attributes["id"].Value; AssetOrTermPointOrPricingStructureReference ob = new AssetOrTermPointOrPricingStructureReference(parameterReferenceNode); IDManager.SetID(parameterReferenceIDRef_, ob); } else if (parameterReferenceNode.Attributes["href"] != null) { parameterReferenceIDRef_ = parameterReferenceNode.Attributes["href"].Value; } else { parameterReference_ = new AssetOrTermPointOrPricingStructureReference(parameterReferenceNode); } } else { parameterReference_ = new AssetOrTermPointOrPricingStructureReference(parameterReferenceNode); } } XmlNodeList inputDateReferenceNodeList = xmlNode.SelectNodes("inputDateReference"); if (inputDateReferenceNodeList != null) { this.inputDateReference_ = new List <ValuationReference>(); foreach (XmlNode item in inputDateReferenceNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] != null) { if (item.Attributes["id"] != null) { inputDateReferenceIDRef_ = item.Attributes["id"].Value; inputDateReference_.Add(new ValuationReference(item)); IDManager.SetID(inputDateReferenceIDRef_, inputDateReference_[inputDateReference_.Count - 1]); } else if (item.Attributes["href"] != null) { inputDateReferenceIDRef_ = item.Attributes["href"].Value; } else { inputDateReference_.Add(new ValuationReference(item)); } } else { inputDateReference_.Add(new ValuationReference(item)); } } } XmlNode calculationProcedureNode = xmlNode.SelectSingleNode("calculationProcedure"); if (calculationProcedureNode != null) { if (calculationProcedureNode.Attributes["href"] != null || calculationProcedureNode.Attributes["id"] != null) { if (calculationProcedureNode.Attributes["id"] != null) { calculationProcedureIDRef_ = calculationProcedureNode.Attributes["id"].Value; DerivativeCalculationProcedure ob = new DerivativeCalculationProcedure(calculationProcedureNode); IDManager.SetID(calculationProcedureIDRef_, ob); } else if (calculationProcedureNode.Attributes["href"] != null) { calculationProcedureIDRef_ = calculationProcedureNode.Attributes["href"].Value; } else { calculationProcedure_ = new DerivativeCalculationProcedure(calculationProcedureNode); } } else { calculationProcedure_ = new DerivativeCalculationProcedure(calculationProcedureNode); } } }
public Address(XmlNode xmlNode) { XmlNode streetAddressNode = xmlNode.SelectSingleNode("streetAddress"); if (streetAddressNode != null) { if (streetAddressNode.Attributes["href"] != null || streetAddressNode.Attributes["id"] != null) { if (streetAddressNode.Attributes["id"] != null) { streetAddressIDRef_ = streetAddressNode.Attributes["id"].Value; StreetAddress ob = new StreetAddress(streetAddressNode); IDManager.SetID(streetAddressIDRef_, ob); } else if (streetAddressNode.Attributes["href"] != null) { streetAddressIDRef_ = streetAddressNode.Attributes["href"].Value; } else { streetAddress_ = new StreetAddress(streetAddressNode); } } else { streetAddress_ = new StreetAddress(streetAddressNode); } } XmlNode cityNode = xmlNode.SelectSingleNode("city"); if (cityNode != null) { if (cityNode.Attributes["href"] != null || cityNode.Attributes["id"] != null) { if (cityNode.Attributes["id"] != null) { cityIDRef_ = cityNode.Attributes["id"].Value; XsdTypeString ob = new XsdTypeString(cityNode); IDManager.SetID(cityIDRef_, ob); } else if (cityNode.Attributes["href"] != null) { cityIDRef_ = cityNode.Attributes["href"].Value; } else { city_ = new XsdTypeString(cityNode); } } else { city_ = new XsdTypeString(cityNode); } } XmlNode stateNode = xmlNode.SelectSingleNode("state"); if (stateNode != null) { if (stateNode.Attributes["href"] != null || stateNode.Attributes["id"] != null) { if (stateNode.Attributes["id"] != null) { stateIDRef_ = stateNode.Attributes["id"].Value; XsdTypeString ob = new XsdTypeString(stateNode); IDManager.SetID(stateIDRef_, ob); } else if (stateNode.Attributes["href"] != null) { stateIDRef_ = stateNode.Attributes["href"].Value; } else { state_ = new XsdTypeString(stateNode); } } else { state_ = new XsdTypeString(stateNode); } } XmlNode countryNode = xmlNode.SelectSingleNode("country"); if (countryNode != null) { if (countryNode.Attributes["href"] != null || countryNode.Attributes["id"] != null) { if (countryNode.Attributes["id"] != null) { countryIDRef_ = countryNode.Attributes["id"].Value; CountryCode ob = new CountryCode(countryNode); IDManager.SetID(countryIDRef_, ob); } else if (countryNode.Attributes["href"] != null) { countryIDRef_ = countryNode.Attributes["href"].Value; } else { country_ = new CountryCode(countryNode); } } else { country_ = new CountryCode(countryNode); } } XmlNode postalCodeNode = xmlNode.SelectSingleNode("postalCode"); if (postalCodeNode != null) { if (postalCodeNode.Attributes["href"] != null || postalCodeNode.Attributes["id"] != null) { if (postalCodeNode.Attributes["id"] != null) { postalCodeIDRef_ = postalCodeNode.Attributes["id"].Value; XsdTypeString ob = new XsdTypeString(postalCodeNode); IDManager.SetID(postalCodeIDRef_, ob); } else if (postalCodeNode.Attributes["href"] != null) { postalCodeIDRef_ = postalCodeNode.Attributes["href"].Value; } else { postalCode_ = new XsdTypeString(postalCodeNode); } } else { postalCode_ = new XsdTypeString(postalCodeNode); } } }
public SensitivitySetDefinition(XmlNode xmlNode) { XmlNode nameNode = xmlNode.SelectSingleNode("name"); if (nameNode != null) { if (nameNode.Attributes["href"] != null || nameNode.Attributes["id"] != null) { if (nameNode.Attributes["id"] != null) { nameIDRef_ = nameNode.Attributes["id"].Value; XsdTypeString ob = new XsdTypeString(nameNode); IDManager.SetID(nameIDRef_, ob); } else if (nameNode.Attributes["href"] != null) { nameIDRef_ = nameNode.Attributes["href"].Value; } else { name_ = new XsdTypeString(nameNode); } } else { name_ = new XsdTypeString(nameNode); } } XmlNode sensitivityCharacteristicsNode = xmlNode.SelectSingleNode("sensitivityCharacteristics"); if (sensitivityCharacteristicsNode != null) { if (sensitivityCharacteristicsNode.Attributes["href"] != null || sensitivityCharacteristicsNode.Attributes["id"] != null) { if (sensitivityCharacteristicsNode.Attributes["id"] != null) { sensitivityCharacteristicsIDRef_ = sensitivityCharacteristicsNode.Attributes["id"].Value; QuotationCharacteristics ob = new QuotationCharacteristics(sensitivityCharacteristicsNode); IDManager.SetID(sensitivityCharacteristicsIDRef_, ob); } else if (sensitivityCharacteristicsNode.Attributes["href"] != null) { sensitivityCharacteristicsIDRef_ = sensitivityCharacteristicsNode.Attributes["href"].Value; } else { sensitivityCharacteristics_ = new QuotationCharacteristics(sensitivityCharacteristicsNode); } } else { sensitivityCharacteristics_ = new QuotationCharacteristics(sensitivityCharacteristicsNode); } } XmlNode valuationScenarioReferenceNode = xmlNode.SelectSingleNode("valuationScenarioReference"); if (valuationScenarioReferenceNode != null) { if (valuationScenarioReferenceNode.Attributes["href"] != null || valuationScenarioReferenceNode.Attributes["id"] != null) { if (valuationScenarioReferenceNode.Attributes["id"] != null) { valuationScenarioReferenceIDRef_ = valuationScenarioReferenceNode.Attributes["id"].Value; ValuationScenarioReference ob = new ValuationScenarioReference(valuationScenarioReferenceNode); IDManager.SetID(valuationScenarioReferenceIDRef_, ob); } else if (valuationScenarioReferenceNode.Attributes["href"] != null) { valuationScenarioReferenceIDRef_ = valuationScenarioReferenceNode.Attributes["href"].Value; } else { valuationScenarioReference_ = new ValuationScenarioReference(valuationScenarioReferenceNode); } } else { valuationScenarioReference_ = new ValuationScenarioReference(valuationScenarioReferenceNode); } } XmlNode pricingInputTypeNode = xmlNode.SelectSingleNode("pricingInputType"); if (pricingInputTypeNode != null) { if (pricingInputTypeNode.Attributes["href"] != null || pricingInputTypeNode.Attributes["id"] != null) { if (pricingInputTypeNode.Attributes["id"] != null) { pricingInputTypeIDRef_ = pricingInputTypeNode.Attributes["id"].Value; PricingInputType ob = new PricingInputType(pricingInputTypeNode); IDManager.SetID(pricingInputTypeIDRef_, ob); } else if (pricingInputTypeNode.Attributes["href"] != null) { pricingInputTypeIDRef_ = pricingInputTypeNode.Attributes["href"].Value; } else { pricingInputType_ = new PricingInputType(pricingInputTypeNode); } } else { pricingInputType_ = new PricingInputType(pricingInputTypeNode); } } XmlNode pricingInputReferenceNode = xmlNode.SelectSingleNode("pricingInputReference"); if (pricingInputReferenceNode != null) { if (pricingInputReferenceNode.Attributes["href"] != null || pricingInputReferenceNode.Attributes["id"] != null) { if (pricingInputReferenceNode.Attributes["id"] != null) { pricingInputReferenceIDRef_ = pricingInputReferenceNode.Attributes["id"].Value; PricingStructureReference ob = new PricingStructureReference(pricingInputReferenceNode); IDManager.SetID(pricingInputReferenceIDRef_, ob); } else if (pricingInputReferenceNode.Attributes["href"] != null) { pricingInputReferenceIDRef_ = pricingInputReferenceNode.Attributes["href"].Value; } else { pricingInputReference_ = new PricingStructureReference(pricingInputReferenceNode); } } else { pricingInputReference_ = new PricingStructureReference(pricingInputReferenceNode); } } XmlNode scaleNode = xmlNode.SelectSingleNode("scale"); if (scaleNode != null) { if (scaleNode.Attributes["href"] != null || scaleNode.Attributes["id"] != null) { if (scaleNode.Attributes["id"] != null) { scaleIDRef_ = scaleNode.Attributes["id"].Value; XsdTypeDecimal ob = new XsdTypeDecimal(scaleNode); IDManager.SetID(scaleIDRef_, ob); } else if (scaleNode.Attributes["href"] != null) { scaleIDRef_ = scaleNode.Attributes["href"].Value; } else { scale_ = new XsdTypeDecimal(scaleNode); } } else { scale_ = new XsdTypeDecimal(scaleNode); } } XmlNodeList sensitivityDefinitionNodeList = xmlNode.SelectNodes("sensitivityDefinition"); if (sensitivityDefinitionNodeList != null) { this.sensitivityDefinition_ = new List<SensitivityDefinition>(); foreach (XmlNode item in sensitivityDefinitionNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] != null) { if (item.Attributes["id"] != null) { sensitivityDefinitionIDRef_ = item.Attributes["id"].Value; sensitivityDefinition_.Add(new SensitivityDefinition(item)); IDManager.SetID(sensitivityDefinitionIDRef_, sensitivityDefinition_[sensitivityDefinition_.Count - 1 ]); } else if (item.Attributes["href"] != null) { sensitivityDefinitionIDRef_ = item.Attributes["href"].Value; } else { sensitivityDefinition_.Add(new SensitivityDefinition(item)); } } else { sensitivityDefinition_.Add(new SensitivityDefinition(item)); } } } XmlNode calculationProcedureNode = xmlNode.SelectSingleNode("calculationProcedure"); if (calculationProcedureNode != null) { if (calculationProcedureNode.Attributes["href"] != null || calculationProcedureNode.Attributes["id"] != null) { if (calculationProcedureNode.Attributes["id"] != null) { calculationProcedureIDRef_ = calculationProcedureNode.Attributes["id"].Value; DerivativeCalculationProcedure ob = new DerivativeCalculationProcedure(calculationProcedureNode); IDManager.SetID(calculationProcedureIDRef_, ob); } else if (calculationProcedureNode.Attributes["href"] != null) { calculationProcedureIDRef_ = calculationProcedureNode.Attributes["href"].Value; } else { calculationProcedure_ = new DerivativeCalculationProcedure(calculationProcedureNode); } } else { calculationProcedure_ = new DerivativeCalculationProcedure(calculationProcedureNode); } } }
public DeliverableObligations(XmlNode xmlNode) { XmlNode accruedInterestNode = xmlNode.SelectSingleNode("accruedInterest"); if (accruedInterestNode != null) { if (accruedInterestNode.Attributes["href"] != null || accruedInterestNode.Attributes["id"] != null) { if (accruedInterestNode.Attributes["id"] != null) { accruedInterestIDRef_ = accruedInterestNode.Attributes["id"].Value; XsdTypeBoolean ob = new XsdTypeBoolean(accruedInterestNode); IDManager.SetID(accruedInterestIDRef_, ob); } else if (accruedInterestNode.Attributes["href"] != null) { accruedInterestIDRef_ = accruedInterestNode.Attributes["href"].Value; } else { accruedInterest_ = new XsdTypeBoolean(accruedInterestNode); } } else { accruedInterest_ = new XsdTypeBoolean(accruedInterestNode); } } XmlNode categoryNode = xmlNode.SelectSingleNode("category"); if (categoryNode != null) { if (categoryNode.Attributes["href"] != null || categoryNode.Attributes["id"] != null) { if (categoryNode.Attributes["id"] != null) { categoryIDRef_ = categoryNode.Attributes["id"].Value; ObligationCategoryEnum ob = new ObligationCategoryEnum(categoryNode); IDManager.SetID(categoryIDRef_, ob); } else if (categoryNode.Attributes["href"] != null) { categoryIDRef_ = categoryNode.Attributes["href"].Value; } else { category_ = new ObligationCategoryEnum(categoryNode); } } else { category_ = new ObligationCategoryEnum(categoryNode); } } XmlNode notSubordinatedNode = xmlNode.SelectSingleNode("notSubordinated"); if (notSubordinatedNode != null) { if (notSubordinatedNode.Attributes["href"] != null || notSubordinatedNode.Attributes["id"] != null) { if (notSubordinatedNode.Attributes["id"] != null) { notSubordinatedIDRef_ = notSubordinatedNode.Attributes["id"].Value; XsdTypeBoolean ob = new XsdTypeBoolean(notSubordinatedNode); IDManager.SetID(notSubordinatedIDRef_, ob); } else if (notSubordinatedNode.Attributes["href"] != null) { notSubordinatedIDRef_ = notSubordinatedNode.Attributes["href"].Value; } else { notSubordinated_ = new XsdTypeBoolean(notSubordinatedNode); } } else { notSubordinated_ = new XsdTypeBoolean(notSubordinatedNode); } } XmlNode specifiedCurrencyNode = xmlNode.SelectSingleNode("specifiedCurrency"); if (specifiedCurrencyNode != null) { if (specifiedCurrencyNode.Attributes["href"] != null || specifiedCurrencyNode.Attributes["id"] != null) { if (specifiedCurrencyNode.Attributes["id"] != null) { specifiedCurrencyIDRef_ = specifiedCurrencyNode.Attributes["id"].Value; SpecifiedCurrency ob = new SpecifiedCurrency(specifiedCurrencyNode); IDManager.SetID(specifiedCurrencyIDRef_, ob); } else if (specifiedCurrencyNode.Attributes["href"] != null) { specifiedCurrencyIDRef_ = specifiedCurrencyNode.Attributes["href"].Value; } else { specifiedCurrency_ = new SpecifiedCurrency(specifiedCurrencyNode); } } else { specifiedCurrency_ = new SpecifiedCurrency(specifiedCurrencyNode); } } XmlNode notSovereignLenderNode = xmlNode.SelectSingleNode("notSovereignLender"); if (notSovereignLenderNode != null) { if (notSovereignLenderNode.Attributes["href"] != null || notSovereignLenderNode.Attributes["id"] != null) { if (notSovereignLenderNode.Attributes["id"] != null) { notSovereignLenderIDRef_ = notSovereignLenderNode.Attributes["id"].Value; XsdTypeBoolean ob = new XsdTypeBoolean(notSovereignLenderNode); IDManager.SetID(notSovereignLenderIDRef_, ob); } else if (notSovereignLenderNode.Attributes["href"] != null) { notSovereignLenderIDRef_ = notSovereignLenderNode.Attributes["href"].Value; } else { notSovereignLender_ = new XsdTypeBoolean(notSovereignLenderNode); } } else { notSovereignLender_ = new XsdTypeBoolean(notSovereignLenderNode); } } XmlNode notDomesticCurrencyNode = xmlNode.SelectSingleNode("notDomesticCurrency"); if (notDomesticCurrencyNode != null) { if (notDomesticCurrencyNode.Attributes["href"] != null || notDomesticCurrencyNode.Attributes["id"] != null) { if (notDomesticCurrencyNode.Attributes["id"] != null) { notDomesticCurrencyIDRef_ = notDomesticCurrencyNode.Attributes["id"].Value; NotDomesticCurrency ob = new NotDomesticCurrency(notDomesticCurrencyNode); IDManager.SetID(notDomesticCurrencyIDRef_, ob); } else if (notDomesticCurrencyNode.Attributes["href"] != null) { notDomesticCurrencyIDRef_ = notDomesticCurrencyNode.Attributes["href"].Value; } else { notDomesticCurrency_ = new NotDomesticCurrency(notDomesticCurrencyNode); } } else { notDomesticCurrency_ = new NotDomesticCurrency(notDomesticCurrencyNode); } } XmlNode notDomesticLawNode = xmlNode.SelectSingleNode("notDomesticLaw"); if (notDomesticLawNode != null) { if (notDomesticLawNode.Attributes["href"] != null || notDomesticLawNode.Attributes["id"] != null) { if (notDomesticLawNode.Attributes["id"] != null) { notDomesticLawIDRef_ = notDomesticLawNode.Attributes["id"].Value; XsdTypeBoolean ob = new XsdTypeBoolean(notDomesticLawNode); IDManager.SetID(notDomesticLawIDRef_, ob); } else if (notDomesticLawNode.Attributes["href"] != null) { notDomesticLawIDRef_ = notDomesticLawNode.Attributes["href"].Value; } else { notDomesticLaw_ = new XsdTypeBoolean(notDomesticLawNode); } } else { notDomesticLaw_ = new XsdTypeBoolean(notDomesticLawNode); } } XmlNode listedNode = xmlNode.SelectSingleNode("listed"); if (listedNode != null) { if (listedNode.Attributes["href"] != null || listedNode.Attributes["id"] != null) { if (listedNode.Attributes["id"] != null) { listedIDRef_ = listedNode.Attributes["id"].Value; XsdTypeBoolean ob = new XsdTypeBoolean(listedNode); IDManager.SetID(listedIDRef_, ob); } else if (listedNode.Attributes["href"] != null) { listedIDRef_ = listedNode.Attributes["href"].Value; } else { listed_ = new XsdTypeBoolean(listedNode); } } else { listed_ = new XsdTypeBoolean(listedNode); } } XmlNode notContingentNode = xmlNode.SelectSingleNode("notContingent"); if (notContingentNode != null) { if (notContingentNode.Attributes["href"] != null || notContingentNode.Attributes["id"] != null) { if (notContingentNode.Attributes["id"] != null) { notContingentIDRef_ = notContingentNode.Attributes["id"].Value; XsdTypeBoolean ob = new XsdTypeBoolean(notContingentNode); IDManager.SetID(notContingentIDRef_, ob); } else if (notContingentNode.Attributes["href"] != null) { notContingentIDRef_ = notContingentNode.Attributes["href"].Value; } else { notContingent_ = new XsdTypeBoolean(notContingentNode); } } else { notContingent_ = new XsdTypeBoolean(notContingentNode); } } XmlNode notDomesticIssuanceNode = xmlNode.SelectSingleNode("notDomesticIssuance"); if (notDomesticIssuanceNode != null) { if (notDomesticIssuanceNode.Attributes["href"] != null || notDomesticIssuanceNode.Attributes["id"] != null) { if (notDomesticIssuanceNode.Attributes["id"] != null) { notDomesticIssuanceIDRef_ = notDomesticIssuanceNode.Attributes["id"].Value; XsdTypeBoolean ob = new XsdTypeBoolean(notDomesticIssuanceNode); IDManager.SetID(notDomesticIssuanceIDRef_, ob); } else if (notDomesticIssuanceNode.Attributes["href"] != null) { notDomesticIssuanceIDRef_ = notDomesticIssuanceNode.Attributes["href"].Value; } else { notDomesticIssuance_ = new XsdTypeBoolean(notDomesticIssuanceNode); } } else { notDomesticIssuance_ = new XsdTypeBoolean(notDomesticIssuanceNode); } } XmlNode assignableLoanNode = xmlNode.SelectSingleNode("assignableLoan"); if (assignableLoanNode != null) { if (assignableLoanNode.Attributes["href"] != null || assignableLoanNode.Attributes["id"] != null) { if (assignableLoanNode.Attributes["id"] != null) { assignableLoanIDRef_ = assignableLoanNode.Attributes["id"].Value; PCDeliverableObligationCharac ob = new PCDeliverableObligationCharac(assignableLoanNode); IDManager.SetID(assignableLoanIDRef_, ob); } else if (assignableLoanNode.Attributes["href"] != null) { assignableLoanIDRef_ = assignableLoanNode.Attributes["href"].Value; } else { assignableLoan_ = new PCDeliverableObligationCharac(assignableLoanNode); } } else { assignableLoan_ = new PCDeliverableObligationCharac(assignableLoanNode); } } XmlNode consentRequiredLoanNode = xmlNode.SelectSingleNode("consentRequiredLoan"); if (consentRequiredLoanNode != null) { if (consentRequiredLoanNode.Attributes["href"] != null || consentRequiredLoanNode.Attributes["id"] != null) { if (consentRequiredLoanNode.Attributes["id"] != null) { consentRequiredLoanIDRef_ = consentRequiredLoanNode.Attributes["id"].Value; PCDeliverableObligationCharac ob = new PCDeliverableObligationCharac(consentRequiredLoanNode); IDManager.SetID(consentRequiredLoanIDRef_, ob); } else if (consentRequiredLoanNode.Attributes["href"] != null) { consentRequiredLoanIDRef_ = consentRequiredLoanNode.Attributes["href"].Value; } else { consentRequiredLoan_ = new PCDeliverableObligationCharac(consentRequiredLoanNode); } } else { consentRequiredLoan_ = new PCDeliverableObligationCharac(consentRequiredLoanNode); } } XmlNode directLoanParticipationNode = xmlNode.SelectSingleNode("directLoanParticipation"); if (directLoanParticipationNode != null) { if (directLoanParticipationNode.Attributes["href"] != null || directLoanParticipationNode.Attributes["id"] != null) { if (directLoanParticipationNode.Attributes["id"] != null) { directLoanParticipationIDRef_ = directLoanParticipationNode.Attributes["id"].Value; LoanParticipation ob = new LoanParticipation(directLoanParticipationNode); IDManager.SetID(directLoanParticipationIDRef_, ob); } else if (directLoanParticipationNode.Attributes["href"] != null) { directLoanParticipationIDRef_ = directLoanParticipationNode.Attributes["href"].Value; } else { directLoanParticipation_ = new LoanParticipation(directLoanParticipationNode); } } else { directLoanParticipation_ = new LoanParticipation(directLoanParticipationNode); } } XmlNode transferableNode = xmlNode.SelectSingleNode("transferable"); if (transferableNode != null) { if (transferableNode.Attributes["href"] != null || transferableNode.Attributes["id"] != null) { if (transferableNode.Attributes["id"] != null) { transferableIDRef_ = transferableNode.Attributes["id"].Value; XsdTypeBoolean ob = new XsdTypeBoolean(transferableNode); IDManager.SetID(transferableIDRef_, ob); } else if (transferableNode.Attributes["href"] != null) { transferableIDRef_ = transferableNode.Attributes["href"].Value; } else { transferable_ = new XsdTypeBoolean(transferableNode); } } else { transferable_ = new XsdTypeBoolean(transferableNode); } } XmlNode maximumMaturityNode = xmlNode.SelectSingleNode("maximumMaturity"); if (maximumMaturityNode != null) { if (maximumMaturityNode.Attributes["href"] != null || maximumMaturityNode.Attributes["id"] != null) { if (maximumMaturityNode.Attributes["id"] != null) { maximumMaturityIDRef_ = maximumMaturityNode.Attributes["id"].Value; Period ob = new Period(maximumMaturityNode); IDManager.SetID(maximumMaturityIDRef_, ob); } else if (maximumMaturityNode.Attributes["href"] != null) { maximumMaturityIDRef_ = maximumMaturityNode.Attributes["href"].Value; } else { maximumMaturity_ = new Period(maximumMaturityNode); } } else { maximumMaturity_ = new Period(maximumMaturityNode); } } XmlNode acceleratedOrMaturedNode = xmlNode.SelectSingleNode("acceleratedOrMatured"); if (acceleratedOrMaturedNode != null) { if (acceleratedOrMaturedNode.Attributes["href"] != null || acceleratedOrMaturedNode.Attributes["id"] != null) { if (acceleratedOrMaturedNode.Attributes["id"] != null) { acceleratedOrMaturedIDRef_ = acceleratedOrMaturedNode.Attributes["id"].Value; XsdTypeBoolean ob = new XsdTypeBoolean(acceleratedOrMaturedNode); IDManager.SetID(acceleratedOrMaturedIDRef_, ob); } else if (acceleratedOrMaturedNode.Attributes["href"] != null) { acceleratedOrMaturedIDRef_ = acceleratedOrMaturedNode.Attributes["href"].Value; } else { acceleratedOrMatured_ = new XsdTypeBoolean(acceleratedOrMaturedNode); } } else { acceleratedOrMatured_ = new XsdTypeBoolean(acceleratedOrMaturedNode); } } XmlNode notBearerNode = xmlNode.SelectSingleNode("notBearer"); if (notBearerNode != null) { if (notBearerNode.Attributes["href"] != null || notBearerNode.Attributes["id"] != null) { if (notBearerNode.Attributes["id"] != null) { notBearerIDRef_ = notBearerNode.Attributes["id"].Value; XsdTypeBoolean ob = new XsdTypeBoolean(notBearerNode); IDManager.SetID(notBearerIDRef_, ob); } else if (notBearerNode.Attributes["href"] != null) { notBearerIDRef_ = notBearerNode.Attributes["href"].Value; } else { notBearer_ = new XsdTypeBoolean(notBearerNode); } } else { notBearer_ = new XsdTypeBoolean(notBearerNode); } } XmlNode fullFaithAndCreditObLiabilityNode = xmlNode.SelectSingleNode("fullFaithAndCreditObLiability"); if (fullFaithAndCreditObLiabilityNode != null) { if (fullFaithAndCreditObLiabilityNode.Attributes["href"] != null || fullFaithAndCreditObLiabilityNode.Attributes["id"] != null) { if (fullFaithAndCreditObLiabilityNode.Attributes["id"] != null) { fullFaithAndCreditObLiabilityIDRef_ = fullFaithAndCreditObLiabilityNode.Attributes["id"].Value; XsdTypeBoolean ob = new XsdTypeBoolean(fullFaithAndCreditObLiabilityNode); IDManager.SetID(fullFaithAndCreditObLiabilityIDRef_, ob); } else if (fullFaithAndCreditObLiabilityNode.Attributes["href"] != null) { fullFaithAndCreditObLiabilityIDRef_ = fullFaithAndCreditObLiabilityNode.Attributes["href"].Value; } else { fullFaithAndCreditObLiability_ = new XsdTypeBoolean(fullFaithAndCreditObLiabilityNode); } } else { fullFaithAndCreditObLiability_ = new XsdTypeBoolean(fullFaithAndCreditObLiabilityNode); } } XmlNode generalFundObligationLiabilityNode = xmlNode.SelectSingleNode("generalFundObligationLiability"); if (generalFundObligationLiabilityNode != null) { if (generalFundObligationLiabilityNode.Attributes["href"] != null || generalFundObligationLiabilityNode.Attributes["id"] != null) { if (generalFundObligationLiabilityNode.Attributes["id"] != null) { generalFundObligationLiabilityIDRef_ = generalFundObligationLiabilityNode.Attributes["id"].Value; XsdTypeBoolean ob = new XsdTypeBoolean(generalFundObligationLiabilityNode); IDManager.SetID(generalFundObligationLiabilityIDRef_, ob); } else if (generalFundObligationLiabilityNode.Attributes["href"] != null) { generalFundObligationLiabilityIDRef_ = generalFundObligationLiabilityNode.Attributes["href"].Value; } else { generalFundObligationLiability_ = new XsdTypeBoolean(generalFundObligationLiabilityNode); } } else { generalFundObligationLiability_ = new XsdTypeBoolean(generalFundObligationLiabilityNode); } } XmlNode revenueObligationLiabilityNode = xmlNode.SelectSingleNode("revenueObligationLiability"); if (revenueObligationLiabilityNode != null) { if (revenueObligationLiabilityNode.Attributes["href"] != null || revenueObligationLiabilityNode.Attributes["id"] != null) { if (revenueObligationLiabilityNode.Attributes["id"] != null) { revenueObligationLiabilityIDRef_ = revenueObligationLiabilityNode.Attributes["id"].Value; XsdTypeBoolean ob = new XsdTypeBoolean(revenueObligationLiabilityNode); IDManager.SetID(revenueObligationLiabilityIDRef_, ob); } else if (revenueObligationLiabilityNode.Attributes["href"] != null) { revenueObligationLiabilityIDRef_ = revenueObligationLiabilityNode.Attributes["href"].Value; } else { revenueObligationLiability_ = new XsdTypeBoolean(revenueObligationLiabilityNode); } } else { revenueObligationLiability_ = new XsdTypeBoolean(revenueObligationLiabilityNode); } } XmlNode indirectLoanParticipationNode = xmlNode.SelectSingleNode("indirectLoanParticipation"); if (indirectLoanParticipationNode != null) { if (indirectLoanParticipationNode.Attributes["href"] != null || indirectLoanParticipationNode.Attributes["id"] != null) { if (indirectLoanParticipationNode.Attributes["id"] != null) { indirectLoanParticipationIDRef_ = indirectLoanParticipationNode.Attributes["id"].Value; LoanParticipation ob = new LoanParticipation(indirectLoanParticipationNode); IDManager.SetID(indirectLoanParticipationIDRef_, ob); } else if (indirectLoanParticipationNode.Attributes["href"] != null) { indirectLoanParticipationIDRef_ = indirectLoanParticipationNode.Attributes["href"].Value; } else { indirectLoanParticipation_ = new LoanParticipation(indirectLoanParticipationNode); } } else { indirectLoanParticipation_ = new LoanParticipation(indirectLoanParticipationNode); } } XmlNode excludedNode = xmlNode.SelectSingleNode("excluded"); if (excludedNode != null) { if (excludedNode.Attributes["href"] != null || excludedNode.Attributes["id"] != null) { if (excludedNode.Attributes["id"] != null) { excludedIDRef_ = excludedNode.Attributes["id"].Value; XsdTypeString ob = new XsdTypeString(excludedNode); IDManager.SetID(excludedIDRef_, ob); } else if (excludedNode.Attributes["href"] != null) { excludedIDRef_ = excludedNode.Attributes["href"].Value; } else { excluded_ = new XsdTypeString(excludedNode); } } else { excluded_ = new XsdTypeString(excludedNode); } } XmlNode othReferenceEntityObligationsNode = xmlNode.SelectSingleNode("othReferenceEntityObligations"); if (othReferenceEntityObligationsNode != null) { if (othReferenceEntityObligationsNode.Attributes["href"] != null || othReferenceEntityObligationsNode.Attributes["id"] != null) { if (othReferenceEntityObligationsNode.Attributes["id"] != null) { othReferenceEntityObligationsIDRef_ = othReferenceEntityObligationsNode.Attributes["id"].Value; XsdTypeString ob = new XsdTypeString(othReferenceEntityObligationsNode); IDManager.SetID(othReferenceEntityObligationsIDRef_, ob); } else if (othReferenceEntityObligationsNode.Attributes["href"] != null) { othReferenceEntityObligationsIDRef_ = othReferenceEntityObligationsNode.Attributes["href"].Value; } else { othReferenceEntityObligations_ = new XsdTypeString(othReferenceEntityObligationsNode); } } else { othReferenceEntityObligations_ = new XsdTypeString(othReferenceEntityObligationsNode); } } }
public ServiceAdvisory(XmlNode xmlNode) { XmlNode categoryNode = xmlNode.SelectSingleNode("category"); if (categoryNode != null) { if (categoryNode.Attributes["href"] != null || categoryNode.Attributes["id"] != null) { if (categoryNode.Attributes["id"] != null) { categoryIDRef_ = categoryNode.Attributes["id"].Value; ServiceAdvisoryCategory ob = new ServiceAdvisoryCategory(categoryNode); IDManager.SetID(categoryIDRef_, ob); } else if (categoryNode.Attributes["href"] != null) { categoryIDRef_ = categoryNode.Attributes["href"].Value; } else { category_ = new ServiceAdvisoryCategory(categoryNode); } } else { category_ = new ServiceAdvisoryCategory(categoryNode); } } XmlNode descriptionNode = xmlNode.SelectSingleNode("description"); if (descriptionNode != null) { if (descriptionNode.Attributes["href"] != null || descriptionNode.Attributes["id"] != null) { if (descriptionNode.Attributes["id"] != null) { descriptionIDRef_ = descriptionNode.Attributes["id"].Value; XsdTypeString ob = new XsdTypeString(descriptionNode); IDManager.SetID(descriptionIDRef_, ob); } else if (descriptionNode.Attributes["href"] != null) { descriptionIDRef_ = descriptionNode.Attributes["href"].Value; } else { description_ = new XsdTypeString(descriptionNode); } } else { description_ = new XsdTypeString(descriptionNode); } } XmlNode effectiveFromNode = xmlNode.SelectSingleNode("effectiveFrom"); if (effectiveFromNode != null) { if (effectiveFromNode.Attributes["href"] != null || effectiveFromNode.Attributes["id"] != null) { if (effectiveFromNode.Attributes["id"] != null) { effectiveFromIDRef_ = effectiveFromNode.Attributes["id"].Value; XsdTypeDateTime ob = new XsdTypeDateTime(effectiveFromNode); IDManager.SetID(effectiveFromIDRef_, ob); } else if (effectiveFromNode.Attributes["href"] != null) { effectiveFromIDRef_ = effectiveFromNode.Attributes["href"].Value; } else { effectiveFrom_ = new XsdTypeDateTime(effectiveFromNode); } } else { effectiveFrom_ = new XsdTypeDateTime(effectiveFromNode); } } XmlNode effectiveToNode = xmlNode.SelectSingleNode("effectiveTo"); if (effectiveToNode != null) { if (effectiveToNode.Attributes["href"] != null || effectiveToNode.Attributes["id"] != null) { if (effectiveToNode.Attributes["id"] != null) { effectiveToIDRef_ = effectiveToNode.Attributes["id"].Value; XsdTypeDateTime ob = new XsdTypeDateTime(effectiveToNode); IDManager.SetID(effectiveToIDRef_, ob); } else if (effectiveToNode.Attributes["href"] != null) { effectiveToIDRef_ = effectiveToNode.Attributes["href"].Value; } else { effectiveTo_ = new XsdTypeDateTime(effectiveToNode); } } else { effectiveTo_ = new XsdTypeDateTime(effectiveToNode); } } }
public SensitivitySet(XmlNode xmlNode) { XmlNode nameNode = xmlNode.SelectSingleNode("name"); if (nameNode != null) { if (nameNode.Attributes["href"] != null || nameNode.Attributes["id"] != null) { if (nameNode.Attributes["id"] != null) { nameIDRef_ = nameNode.Attributes["id"].Value; XsdTypeString ob = new XsdTypeString(nameNode); IDManager.SetID(nameIDRef_, ob); } else if (nameNode.Attributes["href"] != null) { nameIDRef_ = nameNode.Attributes["href"].Value; } else { name_ = new XsdTypeString(nameNode); } } else { name_ = new XsdTypeString(nameNode); } } XmlNode definitionReferenceNode = xmlNode.SelectSingleNode("definitionReference"); if (definitionReferenceNode != null) { if (definitionReferenceNode.Attributes["href"] != null || definitionReferenceNode.Attributes["id"] != null) { if (definitionReferenceNode.Attributes["id"] != null) { definitionReferenceIDRef_ = definitionReferenceNode.Attributes["id"].Value; SensitivitySetDefinitionReference ob = new SensitivitySetDefinitionReference(definitionReferenceNode); IDManager.SetID(definitionReferenceIDRef_, ob); } else if (definitionReferenceNode.Attributes["href"] != null) { definitionReferenceIDRef_ = definitionReferenceNode.Attributes["href"].Value; } else { definitionReference_ = new SensitivitySetDefinitionReference(definitionReferenceNode); } } else { definitionReference_ = new SensitivitySetDefinitionReference(definitionReferenceNode); } } XmlNodeList sensitivityNodeList = xmlNode.SelectNodes("sensitivity"); if (sensitivityNodeList != null) { this.sensitivity_ = new List<Sensitivity>(); foreach (XmlNode item in sensitivityNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] != null) { if (item.Attributes["id"] != null) { sensitivityIDRef_ = item.Attributes["id"].Value; sensitivity_.Add(new Sensitivity(item)); IDManager.SetID(sensitivityIDRef_, sensitivity_[sensitivity_.Count - 1 ]); } else if (item.Attributes["href"] != null) { sensitivityIDRef_ = item.Attributes["href"].Value; } else { sensitivity_.Add(new Sensitivity(item)); } } else { sensitivity_.Add(new Sensitivity(item)); } } } }
public Obligations(XmlNode xmlNode) { XmlNode categoryNode = xmlNode.SelectSingleNode("category"); if (categoryNode != null) { if (categoryNode.Attributes["href"] != null || categoryNode.Attributes["id"] != null) { if (categoryNode.Attributes["id"] != null) { categoryIDRef_ = categoryNode.Attributes["id"].Value; ObligationCategoryEnum ob = new ObligationCategoryEnum(categoryNode); IDManager.SetID(categoryIDRef_, ob); } else if (categoryNode.Attributes["href"] != null) { categoryIDRef_ = categoryNode.Attributes["href"].Value; } else { category_ = new ObligationCategoryEnum(categoryNode); } } else { category_ = new ObligationCategoryEnum(categoryNode); } } XmlNode notSubordinatedNode = xmlNode.SelectSingleNode("notSubordinated"); if (notSubordinatedNode != null) { if (notSubordinatedNode.Attributes["href"] != null || notSubordinatedNode.Attributes["id"] != null) { if (notSubordinatedNode.Attributes["id"] != null) { notSubordinatedIDRef_ = notSubordinatedNode.Attributes["id"].Value; XsdTypeBoolean ob = new XsdTypeBoolean(notSubordinatedNode); IDManager.SetID(notSubordinatedIDRef_, ob); } else if (notSubordinatedNode.Attributes["href"] != null) { notSubordinatedIDRef_ = notSubordinatedNode.Attributes["href"].Value; } else { notSubordinated_ = new XsdTypeBoolean(notSubordinatedNode); } } else { notSubordinated_ = new XsdTypeBoolean(notSubordinatedNode); } } XmlNode specifiedCurrencyNode = xmlNode.SelectSingleNode("specifiedCurrency"); if (specifiedCurrencyNode != null) { if (specifiedCurrencyNode.Attributes["href"] != null || specifiedCurrencyNode.Attributes["id"] != null) { if (specifiedCurrencyNode.Attributes["id"] != null) { specifiedCurrencyIDRef_ = specifiedCurrencyNode.Attributes["id"].Value; SpecifiedCurrency ob = new SpecifiedCurrency(specifiedCurrencyNode); IDManager.SetID(specifiedCurrencyIDRef_, ob); } else if (specifiedCurrencyNode.Attributes["href"] != null) { specifiedCurrencyIDRef_ = specifiedCurrencyNode.Attributes["href"].Value; } else { specifiedCurrency_ = new SpecifiedCurrency(specifiedCurrencyNode); } } else { specifiedCurrency_ = new SpecifiedCurrency(specifiedCurrencyNode); } } XmlNode notSovereignLenderNode = xmlNode.SelectSingleNode("notSovereignLender"); if (notSovereignLenderNode != null) { if (notSovereignLenderNode.Attributes["href"] != null || notSovereignLenderNode.Attributes["id"] != null) { if (notSovereignLenderNode.Attributes["id"] != null) { notSovereignLenderIDRef_ = notSovereignLenderNode.Attributes["id"].Value; XsdTypeBoolean ob = new XsdTypeBoolean(notSovereignLenderNode); IDManager.SetID(notSovereignLenderIDRef_, ob); } else if (notSovereignLenderNode.Attributes["href"] != null) { notSovereignLenderIDRef_ = notSovereignLenderNode.Attributes["href"].Value; } else { notSovereignLender_ = new XsdTypeBoolean(notSovereignLenderNode); } } else { notSovereignLender_ = new XsdTypeBoolean(notSovereignLenderNode); } } XmlNode notDomesticCurrencyNode = xmlNode.SelectSingleNode("notDomesticCurrency"); if (notDomesticCurrencyNode != null) { if (notDomesticCurrencyNode.Attributes["href"] != null || notDomesticCurrencyNode.Attributes["id"] != null) { if (notDomesticCurrencyNode.Attributes["id"] != null) { notDomesticCurrencyIDRef_ = notDomesticCurrencyNode.Attributes["id"].Value; NotDomesticCurrency ob = new NotDomesticCurrency(notDomesticCurrencyNode); IDManager.SetID(notDomesticCurrencyIDRef_, ob); } else if (notDomesticCurrencyNode.Attributes["href"] != null) { notDomesticCurrencyIDRef_ = notDomesticCurrencyNode.Attributes["href"].Value; } else { notDomesticCurrency_ = new NotDomesticCurrency(notDomesticCurrencyNode); } } else { notDomesticCurrency_ = new NotDomesticCurrency(notDomesticCurrencyNode); } } XmlNode notDomesticLawNode = xmlNode.SelectSingleNode("notDomesticLaw"); if (notDomesticLawNode != null) { if (notDomesticLawNode.Attributes["href"] != null || notDomesticLawNode.Attributes["id"] != null) { if (notDomesticLawNode.Attributes["id"] != null) { notDomesticLawIDRef_ = notDomesticLawNode.Attributes["id"].Value; XsdTypeBoolean ob = new XsdTypeBoolean(notDomesticLawNode); IDManager.SetID(notDomesticLawIDRef_, ob); } else if (notDomesticLawNode.Attributes["href"] != null) { notDomesticLawIDRef_ = notDomesticLawNode.Attributes["href"].Value; } else { notDomesticLaw_ = new XsdTypeBoolean(notDomesticLawNode); } } else { notDomesticLaw_ = new XsdTypeBoolean(notDomesticLawNode); } } XmlNode listedNode = xmlNode.SelectSingleNode("listed"); if (listedNode != null) { if (listedNode.Attributes["href"] != null || listedNode.Attributes["id"] != null) { if (listedNode.Attributes["id"] != null) { listedIDRef_ = listedNode.Attributes["id"].Value; XsdTypeBoolean ob = new XsdTypeBoolean(listedNode); IDManager.SetID(listedIDRef_, ob); } else if (listedNode.Attributes["href"] != null) { listedIDRef_ = listedNode.Attributes["href"].Value; } else { listed_ = new XsdTypeBoolean(listedNode); } } else { listed_ = new XsdTypeBoolean(listedNode); } } XmlNode notDomesticIssuanceNode = xmlNode.SelectSingleNode("notDomesticIssuance"); if (notDomesticIssuanceNode != null) { if (notDomesticIssuanceNode.Attributes["href"] != null || notDomesticIssuanceNode.Attributes["id"] != null) { if (notDomesticIssuanceNode.Attributes["id"] != null) { notDomesticIssuanceIDRef_ = notDomesticIssuanceNode.Attributes["id"].Value; XsdTypeBoolean ob = new XsdTypeBoolean(notDomesticIssuanceNode); IDManager.SetID(notDomesticIssuanceIDRef_, ob); } else if (notDomesticIssuanceNode.Attributes["href"] != null) { notDomesticIssuanceIDRef_ = notDomesticIssuanceNode.Attributes["href"].Value; } else { notDomesticIssuance_ = new XsdTypeBoolean(notDomesticIssuanceNode); } } else { notDomesticIssuance_ = new XsdTypeBoolean(notDomesticIssuanceNode); } } XmlNode fullFaithAndCreditObLiabilityNode = xmlNode.SelectSingleNode("fullFaithAndCreditObLiability"); if (fullFaithAndCreditObLiabilityNode != null) { if (fullFaithAndCreditObLiabilityNode.Attributes["href"] != null || fullFaithAndCreditObLiabilityNode.Attributes["id"] != null) { if (fullFaithAndCreditObLiabilityNode.Attributes["id"] != null) { fullFaithAndCreditObLiabilityIDRef_ = fullFaithAndCreditObLiabilityNode.Attributes["id"].Value; XsdTypeBoolean ob = new XsdTypeBoolean(fullFaithAndCreditObLiabilityNode); IDManager.SetID(fullFaithAndCreditObLiabilityIDRef_, ob); } else if (fullFaithAndCreditObLiabilityNode.Attributes["href"] != null) { fullFaithAndCreditObLiabilityIDRef_ = fullFaithAndCreditObLiabilityNode.Attributes["href"].Value; } else { fullFaithAndCreditObLiability_ = new XsdTypeBoolean(fullFaithAndCreditObLiabilityNode); } } else { fullFaithAndCreditObLiability_ = new XsdTypeBoolean(fullFaithAndCreditObLiabilityNode); } } XmlNode generalFundObligationLiabilityNode = xmlNode.SelectSingleNode("generalFundObligationLiability"); if (generalFundObligationLiabilityNode != null) { if (generalFundObligationLiabilityNode.Attributes["href"] != null || generalFundObligationLiabilityNode.Attributes["id"] != null) { if (generalFundObligationLiabilityNode.Attributes["id"] != null) { generalFundObligationLiabilityIDRef_ = generalFundObligationLiabilityNode.Attributes["id"].Value; XsdTypeBoolean ob = new XsdTypeBoolean(generalFundObligationLiabilityNode); IDManager.SetID(generalFundObligationLiabilityIDRef_, ob); } else if (generalFundObligationLiabilityNode.Attributes["href"] != null) { generalFundObligationLiabilityIDRef_ = generalFundObligationLiabilityNode.Attributes["href"].Value; } else { generalFundObligationLiability_ = new XsdTypeBoolean(generalFundObligationLiabilityNode); } } else { generalFundObligationLiability_ = new XsdTypeBoolean(generalFundObligationLiabilityNode); } } XmlNode revenueObligationLiabilityNode = xmlNode.SelectSingleNode("revenueObligationLiability"); if (revenueObligationLiabilityNode != null) { if (revenueObligationLiabilityNode.Attributes["href"] != null || revenueObligationLiabilityNode.Attributes["id"] != null) { if (revenueObligationLiabilityNode.Attributes["id"] != null) { revenueObligationLiabilityIDRef_ = revenueObligationLiabilityNode.Attributes["id"].Value; XsdTypeBoolean ob = new XsdTypeBoolean(revenueObligationLiabilityNode); IDManager.SetID(revenueObligationLiabilityIDRef_, ob); } else if (revenueObligationLiabilityNode.Attributes["href"] != null) { revenueObligationLiabilityIDRef_ = revenueObligationLiabilityNode.Attributes["href"].Value; } else { revenueObligationLiability_ = new XsdTypeBoolean(revenueObligationLiabilityNode); } } else { revenueObligationLiability_ = new XsdTypeBoolean(revenueObligationLiabilityNode); } } XmlNode notContingentNode = xmlNode.SelectSingleNode("notContingent"); if (notContingentNode != null) { if (notContingentNode.Attributes["href"] != null || notContingentNode.Attributes["id"] != null) { if (notContingentNode.Attributes["id"] != null) { notContingentIDRef_ = notContingentNode.Attributes["id"].Value; XsdTypeBoolean ob = new XsdTypeBoolean(notContingentNode); IDManager.SetID(notContingentIDRef_, ob); } else if (notContingentNode.Attributes["href"] != null) { notContingentIDRef_ = notContingentNode.Attributes["href"].Value; } else { notContingent_ = new XsdTypeBoolean(notContingentNode); } } else { notContingent_ = new XsdTypeBoolean(notContingentNode); } } XmlNode excludedNode = xmlNode.SelectSingleNode("excluded"); if (excludedNode != null) { if (excludedNode.Attributes["href"] != null || excludedNode.Attributes["id"] != null) { if (excludedNode.Attributes["id"] != null) { excludedIDRef_ = excludedNode.Attributes["id"].Value; XsdTypeString ob = new XsdTypeString(excludedNode); IDManager.SetID(excludedIDRef_, ob); } else if (excludedNode.Attributes["href"] != null) { excludedIDRef_ = excludedNode.Attributes["href"].Value; } else { excluded_ = new XsdTypeString(excludedNode); } } else { excluded_ = new XsdTypeString(excludedNode); } } XmlNode othReferenceEntityObligationsNode = xmlNode.SelectSingleNode("othReferenceEntityObligations"); if (othReferenceEntityObligationsNode != null) { if (othReferenceEntityObligationsNode.Attributes["href"] != null || othReferenceEntityObligationsNode.Attributes["id"] != null) { if (othReferenceEntityObligationsNode.Attributes["id"] != null) { othReferenceEntityObligationsIDRef_ = othReferenceEntityObligationsNode.Attributes["id"].Value; XsdTypeString ob = new XsdTypeString(othReferenceEntityObligationsNode); IDManager.SetID(othReferenceEntityObligationsIDRef_, ob); } else if (othReferenceEntityObligationsNode.Attributes["href"] != null) { othReferenceEntityObligationsIDRef_ = othReferenceEntityObligationsNode.Attributes["href"].Value; } else { othReferenceEntityObligations_ = new XsdTypeString(othReferenceEntityObligationsNode); } } else { othReferenceEntityObligations_ = new XsdTypeString(othReferenceEntityObligationsNode); } } XmlNode designatedPriorityNode = xmlNode.SelectSingleNode("designatedPriority"); if (designatedPriorityNode != null) { if (designatedPriorityNode.Attributes["href"] != null || designatedPriorityNode.Attributes["id"] != null) { if (designatedPriorityNode.Attributes["id"] != null) { designatedPriorityIDRef_ = designatedPriorityNode.Attributes["id"].Value; Lien ob = new Lien(designatedPriorityNode); IDManager.SetID(designatedPriorityIDRef_, ob); } else if (designatedPriorityNode.Attributes["href"] != null) { designatedPriorityIDRef_ = designatedPriorityNode.Attributes["href"].Value; } else { designatedPriority_ = new Lien(designatedPriorityNode); } } else { designatedPriority_ = new Lien(designatedPriorityNode); } } XmlNode cashSettlementOnlyNode = xmlNode.SelectSingleNode("cashSettlementOnly"); if (cashSettlementOnlyNode != null) { if (cashSettlementOnlyNode.Attributes["href"] != null || cashSettlementOnlyNode.Attributes["id"] != null) { if (cashSettlementOnlyNode.Attributes["id"] != null) { cashSettlementOnlyIDRef_ = cashSettlementOnlyNode.Attributes["id"].Value; XsdTypeBoolean ob = new XsdTypeBoolean(cashSettlementOnlyNode); IDManager.SetID(cashSettlementOnlyIDRef_, ob); } else if (cashSettlementOnlyNode.Attributes["href"] != null) { cashSettlementOnlyIDRef_ = cashSettlementOnlyNode.Attributes["href"].Value; } else { cashSettlementOnly_ = new XsdTypeBoolean(cashSettlementOnlyNode); } } else { cashSettlementOnly_ = new XsdTypeBoolean(cashSettlementOnlyNode); } } XmlNode deliveryOfCommitmentsNode = xmlNode.SelectSingleNode("deliveryOfCommitments"); if (deliveryOfCommitmentsNode != null) { if (deliveryOfCommitmentsNode.Attributes["href"] != null || deliveryOfCommitmentsNode.Attributes["id"] != null) { if (deliveryOfCommitmentsNode.Attributes["id"] != null) { deliveryOfCommitmentsIDRef_ = deliveryOfCommitmentsNode.Attributes["id"].Value; XsdTypeBoolean ob = new XsdTypeBoolean(deliveryOfCommitmentsNode); IDManager.SetID(deliveryOfCommitmentsIDRef_, ob); } else if (deliveryOfCommitmentsNode.Attributes["href"] != null) { deliveryOfCommitmentsIDRef_ = deliveryOfCommitmentsNode.Attributes["href"].Value; } else { deliveryOfCommitments_ = new XsdTypeBoolean(deliveryOfCommitmentsNode); } } else { deliveryOfCommitments_ = new XsdTypeBoolean(deliveryOfCommitmentsNode); } } XmlNode continuityNode = xmlNode.SelectSingleNode("continuity"); if (continuityNode != null) { if (continuityNode.Attributes["href"] != null || continuityNode.Attributes["id"] != null) { if (continuityNode.Attributes["id"] != null) { continuityIDRef_ = continuityNode.Attributes["id"].Value; XsdTypeBoolean ob = new XsdTypeBoolean(continuityNode); IDManager.SetID(continuityIDRef_, ob); } else if (continuityNode.Attributes["href"] != null) { continuityIDRef_ = continuityNode.Attributes["href"].Value; } else { continuity_ = new XsdTypeBoolean(continuityNode); } } else { continuity_ = new XsdTypeBoolean(continuityNode); } } }
public Formula(XmlNode xmlNode) { XmlNode formulaDescriptionNode = xmlNode.SelectSingleNode("formulaDescription"); if (formulaDescriptionNode != null) { if (formulaDescriptionNode.Attributes["href"] != null || formulaDescriptionNode.Attributes["id"] != null) { if (formulaDescriptionNode.Attributes["id"] != null) { formulaDescriptionIDRef_ = formulaDescriptionNode.Attributes["id"].Value; XsdTypeString ob = new XsdTypeString(formulaDescriptionNode); IDManager.SetID(formulaDescriptionIDRef_, ob); } else if (formulaDescriptionNode.Attributes["href"] != null) { formulaDescriptionIDRef_ = formulaDescriptionNode.Attributes["href"].Value; } else { formulaDescription_ = new XsdTypeString(formulaDescriptionNode); } } else { formulaDescription_ = new XsdTypeString(formulaDescriptionNode); } } XmlNode mathNode = xmlNode.SelectSingleNode("math"); if (mathNode != null) { if (mathNode.Attributes["href"] != null || mathNode.Attributes["id"] != null) { if (mathNode.Attributes["id"] != null) { mathIDRef_ = mathNode.Attributes["id"].Value; Math ob = new Math(mathNode); IDManager.SetID(mathIDRef_, ob); } else if (mathNode.Attributes["href"] != null) { mathIDRef_ = mathNode.Attributes["href"].Value; } else { math_ = new Math(mathNode); } } else { math_ = new Math(mathNode); } } XmlNodeList formulaComponentNodeList = xmlNode.SelectNodes("formulaComponent"); if (formulaComponentNodeList != null) { this.formulaComponent_ = new List<FormulaComponent>(); foreach (XmlNode item in formulaComponentNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] != null) { if (item.Attributes["id"] != null) { formulaComponentIDRef_ = item.Attributes["id"].Value; formulaComponent_.Add(new FormulaComponent(item)); IDManager.SetID(formulaComponentIDRef_, formulaComponent_[formulaComponent_.Count - 1 ]); } else if (item.Attributes["href"] != null) { formulaComponentIDRef_ = item.Attributes["href"].Value; } else { formulaComponent_.Add(new FormulaComponent(item)); } } else { formulaComponent_.Add(new FormulaComponent(item)); } } } }
public DerivativeCalculationProcedure(XmlNode xmlNode) { XmlNode methodNode = xmlNode.SelectSingleNode("method"); if (methodNode != null) { if (methodNode.Attributes["href"] != null || methodNode.Attributes["id"] != null) { if (methodNode.Attributes["id"] != null) { methodIDRef_ = methodNode.Attributes["id"].Value; DerivativeCalculationMethod ob = new DerivativeCalculationMethod(methodNode); IDManager.SetID(methodIDRef_, ob); } else if (methodNode.Attributes["href"] != null) { methodIDRef_ = methodNode.Attributes["href"].Value; } else { method_ = new DerivativeCalculationMethod(methodNode); } } else { method_ = new DerivativeCalculationMethod(methodNode); } } XmlNode perturbationAmountNode = xmlNode.SelectSingleNode("perturbationAmount"); if (perturbationAmountNode != null) { if (perturbationAmountNode.Attributes["href"] != null || perturbationAmountNode.Attributes["id"] != null) { if (perturbationAmountNode.Attributes["id"] != null) { perturbationAmountIDRef_ = perturbationAmountNode.Attributes["id"].Value; XsdTypeDecimal ob = new XsdTypeDecimal(perturbationAmountNode); IDManager.SetID(perturbationAmountIDRef_, ob); } else if (perturbationAmountNode.Attributes["href"] != null) { perturbationAmountIDRef_ = perturbationAmountNode.Attributes["href"].Value; } else { perturbationAmount_ = new XsdTypeDecimal(perturbationAmountNode); } } else { perturbationAmount_ = new XsdTypeDecimal(perturbationAmountNode); } } XmlNode averagedNode = xmlNode.SelectSingleNode("averaged"); if (averagedNode != null) { if (averagedNode.Attributes["href"] != null || averagedNode.Attributes["id"] != null) { if (averagedNode.Attributes["id"] != null) { averagedIDRef_ = averagedNode.Attributes["id"].Value; XsdTypeBoolean ob = new XsdTypeBoolean(averagedNode); IDManager.SetID(averagedIDRef_, ob); } else if (averagedNode.Attributes["href"] != null) { averagedIDRef_ = averagedNode.Attributes["href"].Value; } else { averaged_ = new XsdTypeBoolean(averagedNode); } } else { averaged_ = new XsdTypeBoolean(averagedNode); } } XmlNode perturbationTypeNode = xmlNode.SelectSingleNode("perturbationType"); if (perturbationTypeNode != null) { if (perturbationTypeNode.Attributes["href"] != null || perturbationTypeNode.Attributes["id"] != null) { if (perturbationTypeNode.Attributes["id"] != null) { perturbationTypeIDRef_ = perturbationTypeNode.Attributes["id"].Value; PerturbationType ob = new PerturbationType(perturbationTypeNode); IDManager.SetID(perturbationTypeIDRef_, ob); } else if (perturbationTypeNode.Attributes["href"] != null) { perturbationTypeIDRef_ = perturbationTypeNode.Attributes["href"].Value; } else { perturbationType_ = new PerturbationType(perturbationTypeNode); } } else { perturbationType_ = new PerturbationType(perturbationTypeNode); } } XmlNode derivativeFormulaNode = xmlNode.SelectSingleNode("derivativeFormula"); if (derivativeFormulaNode != null) { if (derivativeFormulaNode.Attributes["href"] != null || derivativeFormulaNode.Attributes["id"] != null) { if (derivativeFormulaNode.Attributes["id"] != null) { derivativeFormulaIDRef_ = derivativeFormulaNode.Attributes["id"].Value; XsdTypeString ob = new XsdTypeString(derivativeFormulaNode); IDManager.SetID(derivativeFormulaIDRef_, ob); } else if (derivativeFormulaNode.Attributes["href"] != null) { derivativeFormulaIDRef_ = derivativeFormulaNode.Attributes["href"].Value; } else { derivativeFormula_ = new XsdTypeString(derivativeFormulaNode); } } else { derivativeFormula_ = new XsdTypeString(derivativeFormulaNode); } } XmlNode replacementMarketInputNode = xmlNode.SelectSingleNode("replacementMarketInput"); if (replacementMarketInputNode != null) { if (replacementMarketInputNode.Attributes["href"] != null || replacementMarketInputNode.Attributes["id"] != null) { if (replacementMarketInputNode.Attributes["id"] != null) { replacementMarketInputIDRef_ = replacementMarketInputNode.Attributes["id"].Value; PricingStructureReference ob = new PricingStructureReference(replacementMarketInputNode); IDManager.SetID(replacementMarketInputIDRef_, ob); } else if (replacementMarketInputNode.Attributes["href"] != null) { replacementMarketInputIDRef_ = replacementMarketInputNode.Attributes["href"].Value; } else { replacementMarketInput_ = new PricingStructureReference(replacementMarketInputNode); } } else { replacementMarketInput_ = new PricingStructureReference(replacementMarketInputNode); } } }
public SensitivityDefinition(XmlNode xmlNode) { XmlNode nameNode = xmlNode.SelectSingleNode("name"); if (nameNode != null) { if (nameNode.Attributes["href"] != null || nameNode.Attributes["id"] != null) { if (nameNode.Attributes["id"] != null) { nameIDRef_ = nameNode.Attributes["id"].Value; XsdTypeString ob = new XsdTypeString(nameNode); IDManager.SetID(nameIDRef_, ob); } else if (nameNode.Attributes["href"] != null) { nameIDRef_ = nameNode.Attributes["href"].Value; } else { name_ = new XsdTypeString(nameNode); } } else { name_ = new XsdTypeString(nameNode); } } XmlNode valuationScenarioReferenceNode = xmlNode.SelectSingleNode("valuationScenarioReference"); if (valuationScenarioReferenceNode != null) { if (valuationScenarioReferenceNode.Attributes["href"] != null || valuationScenarioReferenceNode.Attributes["id"] != null) { if (valuationScenarioReferenceNode.Attributes["id"] != null) { valuationScenarioReferenceIDRef_ = valuationScenarioReferenceNode.Attributes["id"].Value; ValuationScenarioReference ob = new ValuationScenarioReference(valuationScenarioReferenceNode); IDManager.SetID(valuationScenarioReferenceIDRef_, ob); } else if (valuationScenarioReferenceNode.Attributes["href"] != null) { valuationScenarioReferenceIDRef_ = valuationScenarioReferenceNode.Attributes["href"].Value; } else { valuationScenarioReference_ = new ValuationScenarioReference(valuationScenarioReferenceNode); } } else { valuationScenarioReference_ = new ValuationScenarioReference(valuationScenarioReferenceNode); } } XmlNodeList partialDerivativeNodeList = xmlNode.SelectNodes("partialDerivative"); if (partialDerivativeNodeList != null) { this.partialDerivative_ = new List <PricingParameterDerivative>(); foreach (XmlNode item in partialDerivativeNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] != null) { if (item.Attributes["id"] != null) { partialDerivativeIDRef_ = item.Attributes["id"].Value; partialDerivative_.Add(new PricingParameterDerivative(item)); IDManager.SetID(partialDerivativeIDRef_, partialDerivative_[partialDerivative_.Count - 1]); } else if (item.Attributes["href"] != null) { partialDerivativeIDRef_ = item.Attributes["href"].Value; } else { partialDerivative_.Add(new PricingParameterDerivative(item)); } } else { partialDerivative_.Add(new PricingParameterDerivative(item)); } } } XmlNode formulaNode = xmlNode.SelectSingleNode("formula"); if (formulaNode != null) { if (formulaNode.Attributes["href"] != null || formulaNode.Attributes["id"] != null) { if (formulaNode.Attributes["id"] != null) { formulaIDRef_ = formulaNode.Attributes["id"].Value; DerivativeFormula ob = new DerivativeFormula(formulaNode); IDManager.SetID(formulaIDRef_, ob); } else if (formulaNode.Attributes["href"] != null) { formulaIDRef_ = formulaNode.Attributes["href"].Value; } else { formula_ = new DerivativeFormula(formulaNode); } } else { formula_ = new DerivativeFormula(formulaNode); } } 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; TimeDimension ob = new TimeDimension(termNode); IDManager.SetID(termIDRef_, ob); } else if (termNode.Attributes["href"] != null) { termIDRef_ = termNode.Attributes["href"].Value; } else { term_ = new TimeDimension(termNode); } } else { term_ = new TimeDimension(termNode); } } XmlNode coordinateNode = xmlNode.SelectSingleNode("coordinate"); if (coordinateNode != null) { if (coordinateNode.Attributes["href"] != null || coordinateNode.Attributes["id"] != null) { if (coordinateNode.Attributes["id"] != null) { coordinateIDRef_ = coordinateNode.Attributes["id"].Value; PricingDataPointCoordinate ob = new PricingDataPointCoordinate(coordinateNode); IDManager.SetID(coordinateIDRef_, ob); } else if (coordinateNode.Attributes["href"] != null) { coordinateIDRef_ = coordinateNode.Attributes["href"].Value; } else { coordinate_ = new PricingDataPointCoordinate(coordinateNode); } } else { coordinate_ = new PricingDataPointCoordinate(coordinateNode); } } XmlNode coordinateReferenceNode = xmlNode.SelectSingleNode("coordinateReference"); if (coordinateReferenceNode != null) { if (coordinateReferenceNode.Attributes["href"] != null || coordinateReferenceNode.Attributes["id"] != null) { if (coordinateReferenceNode.Attributes["id"] != null) { coordinateReferenceIDRef_ = coordinateReferenceNode.Attributes["id"].Value; PricingDataPointCoordinateReference ob = new PricingDataPointCoordinateReference(coordinateReferenceNode); IDManager.SetID(coordinateReferenceIDRef_, ob); } else if (coordinateReferenceNode.Attributes["href"] != null) { coordinateReferenceIDRef_ = coordinateReferenceNode.Attributes["href"].Value; } else { coordinateReference_ = new PricingDataPointCoordinateReference(coordinateReferenceNode); } } else { coordinateReference_ = new PricingDataPointCoordinateReference(coordinateReferenceNode); } } }
public ValuationScenario(XmlNode xmlNode) { XmlNodeList nameNodeList = xmlNode.SelectNodes("name"); if (nameNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in nameNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { nameIDRef = item.Attributes["id"].Name; XsdTypeString ob = XsdTypeString(); IDManager.SetID(nameIDRef, ob); } else if (item.Attributes.ToString() == "href") { nameIDRef = item.Attributes["href"].Name; } else { name = new XsdTypeString(item); } } } XmlNodeList valuationDateNodeList = xmlNode.SelectNodes("valuationDate"); if (valuationDateNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in valuationDateNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { valuationDateIDRef = item.Attributes["id"].Name; IdentifiedDate ob = IdentifiedDate(); IDManager.SetID(valuationDateIDRef, ob); } else if (item.Attributes.ToString() == "href") { valuationDateIDRef = item.Attributes["href"].Name; } else { valuationDate = new IdentifiedDate(item); } } } XmlNodeList marketReferenceNodeList = xmlNode.SelectNodes("marketReference"); if (marketReferenceNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in marketReferenceNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { marketReferenceIDRef = item.Attributes["id"].Name; MarketReference ob = MarketReference(); IDManager.SetID(marketReferenceIDRef, ob); } else if (item.Attributes.ToString() == "href") { marketReferenceIDRef = item.Attributes["href"].Name; } else { marketReference = new MarketReference(item); } } } XmlNodeList shiftNodeList = xmlNode.SelectNodes("shift"); foreach (XmlNode item in shiftNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { shiftIDRef = item.Attributes["id"].Name; List <PricingParameterShift> ob = new List <PricingParameterShift>(); ob.Add(new PricingParameterShift(item)); IDManager.SetID(shiftIDRef, ob); } else if (item.Attributes.ToString() == "href") { shiftIDRef = item.Attributes["href"].Name; } else { shift.Add(new PricingParameterShift(item)); } } } XmlNodeList replacementNodeList = xmlNode.SelectNodes("replacement"); foreach (XmlNode item in replacementNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { replacementIDRef = item.Attributes["id"].Name; List <PricingInputReplacement> ob = new List <PricingInputReplacement>(); ob.Add(new PricingInputReplacement(item)); IDManager.SetID(replacementIDRef, ob); } else if (item.Attributes.ToString() == "href") { replacementIDRef = item.Attributes["href"].Name; } else { replacement.Add(new PricingInputReplacement(item)); } } } }
public FxAsianFeature(XmlNode xmlNode) { XmlNode primaryRateSourceNode = xmlNode.SelectSingleNode("primaryRateSource"); if (primaryRateSourceNode != null) { if (primaryRateSourceNode.Attributes["href"] != null || primaryRateSourceNode.Attributes["id"] != null) { if (primaryRateSourceNode.Attributes["id"] != null) { primaryRateSourceIDRef_ = primaryRateSourceNode.Attributes["id"].Value; InformationSource ob = new InformationSource(primaryRateSourceNode); IDManager.SetID(primaryRateSourceIDRef_, ob); } else if (primaryRateSourceNode.Attributes["href"] != null) { primaryRateSourceIDRef_ = primaryRateSourceNode.Attributes["href"].Value; } else { primaryRateSource_ = new InformationSource(primaryRateSourceNode); } } else { primaryRateSource_ = new InformationSource(primaryRateSourceNode); } } XmlNode secondaryRateSourceNode = xmlNode.SelectSingleNode("secondaryRateSource"); if (secondaryRateSourceNode != null) { if (secondaryRateSourceNode.Attributes["href"] != null || secondaryRateSourceNode.Attributes["id"] != null) { if (secondaryRateSourceNode.Attributes["id"] != null) { secondaryRateSourceIDRef_ = secondaryRateSourceNode.Attributes["id"].Value; InformationSource ob = new InformationSource(secondaryRateSourceNode); IDManager.SetID(secondaryRateSourceIDRef_, ob); } else if (secondaryRateSourceNode.Attributes["href"] != null) { secondaryRateSourceIDRef_ = secondaryRateSourceNode.Attributes["href"].Value; } else { secondaryRateSource_ = new InformationSource(secondaryRateSourceNode); } } else { secondaryRateSource_ = new InformationSource(secondaryRateSourceNode); } } XmlNode fixingTimeNode = xmlNode.SelectSingleNode("fixingTime"); if (fixingTimeNode != null) { if (fixingTimeNode.Attributes["href"] != null || fixingTimeNode.Attributes["id"] != null) { if (fixingTimeNode.Attributes["id"] != null) { fixingTimeIDRef_ = fixingTimeNode.Attributes["id"].Value; BusinessCenterTime ob = new BusinessCenterTime(fixingTimeNode); IDManager.SetID(fixingTimeIDRef_, ob); } else if (fixingTimeNode.Attributes["href"] != null) { fixingTimeIDRef_ = fixingTimeNode.Attributes["href"].Value; } else { fixingTime_ = new BusinessCenterTime(fixingTimeNode); } } else { fixingTime_ = new BusinessCenterTime(fixingTimeNode); } } XmlNode observationScheduleNode = xmlNode.SelectSingleNode("observationSchedule"); if (observationScheduleNode != null) { if (observationScheduleNode.Attributes["href"] != null || observationScheduleNode.Attributes["id"] != null) { if (observationScheduleNode.Attributes["id"] != null) { observationScheduleIDRef_ = observationScheduleNode.Attributes["id"].Value; FxAverageRateObservationSchedule ob = new FxAverageRateObservationSchedule(observationScheduleNode); IDManager.SetID(observationScheduleIDRef_, ob); } else if (observationScheduleNode.Attributes["href"] != null) { observationScheduleIDRef_ = observationScheduleNode.Attributes["href"].Value; } else { observationSchedule_ = new FxAverageRateObservationSchedule(observationScheduleNode); } } else { observationSchedule_ = new FxAverageRateObservationSchedule(observationScheduleNode); } } XmlNodeList rateObservationNodeList = xmlNode.SelectNodes("rateObservation"); if (rateObservationNodeList != null) { this.rateObservation_ = new List<FxAverageRateObservation>(); foreach (XmlNode item in rateObservationNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] != null) { if (item.Attributes["id"] != null) { rateObservationIDRef_ = item.Attributes["id"].Value; rateObservation_.Add(new FxAverageRateObservation(item)); IDManager.SetID(rateObservationIDRef_, rateObservation_[rateObservation_.Count - 1 ]); } else if (item.Attributes["href"] != null) { rateObservationIDRef_ = item.Attributes["href"].Value; } else { rateObservation_.Add(new FxAverageRateObservation(item)); } } else { rateObservation_.Add(new FxAverageRateObservation(item)); } } } XmlNode rateObservationQuoteBasisNode = xmlNode.SelectSingleNode("rateObservationQuoteBasis"); if (rateObservationQuoteBasisNode != null) { if (rateObservationQuoteBasisNode.Attributes["href"] != null || rateObservationQuoteBasisNode.Attributes["id"] != null) { if (rateObservationQuoteBasisNode.Attributes["id"] != null) { rateObservationQuoteBasisIDRef_ = rateObservationQuoteBasisNode.Attributes["id"].Value; StrikeQuoteBasisEnum ob = new StrikeQuoteBasisEnum(rateObservationQuoteBasisNode); IDManager.SetID(rateObservationQuoteBasisIDRef_, ob); } else if (rateObservationQuoteBasisNode.Attributes["href"] != null) { rateObservationQuoteBasisIDRef_ = rateObservationQuoteBasisNode.Attributes["href"].Value; } else { rateObservationQuoteBasis_ = new StrikeQuoteBasisEnum(rateObservationQuoteBasisNode); } } else { rateObservationQuoteBasis_ = new StrikeQuoteBasisEnum(rateObservationQuoteBasisNode); } } XmlNode payoutFormulaNode = xmlNode.SelectSingleNode("payoutFormula"); if (payoutFormulaNode != null) { if (payoutFormulaNode.Attributes["href"] != null || payoutFormulaNode.Attributes["id"] != null) { if (payoutFormulaNode.Attributes["id"] != null) { payoutFormulaIDRef_ = payoutFormulaNode.Attributes["id"].Value; XsdTypeString ob = new XsdTypeString(payoutFormulaNode); IDManager.SetID(payoutFormulaIDRef_, ob); } else if (payoutFormulaNode.Attributes["href"] != null) { payoutFormulaIDRef_ = payoutFormulaNode.Attributes["href"].Value; } else { payoutFormula_ = new XsdTypeString(payoutFormulaNode); } } else { payoutFormula_ = new XsdTypeString(payoutFormulaNode); } } XmlNode precisionNode = xmlNode.SelectSingleNode("precision"); if (precisionNode != null) { if (precisionNode.Attributes["href"] != null || precisionNode.Attributes["id"] != null) { if (precisionNode.Attributes["id"] != null) { precisionIDRef_ = precisionNode.Attributes["id"].Value; XsdTypeNonNegativeInteger ob = new XsdTypeNonNegativeInteger(precisionNode); IDManager.SetID(precisionIDRef_, ob); } else if (precisionNode.Attributes["href"] != null) { precisionIDRef_ = precisionNode.Attributes["href"].Value; } else { precision_ = new XsdTypeNonNegativeInteger(precisionNode); } } else { precision_ = new XsdTypeNonNegativeInteger(precisionNode); } } }
public Future(XmlNode xmlNode) : base(xmlNode) { XmlNode multiplierNode = xmlNode.SelectSingleNode("multiplier"); if (multiplierNode != null) { if (multiplierNode.Attributes["href"] != null || multiplierNode.Attributes["id"] != null) { if (multiplierNode.Attributes["id"] != null) { multiplierIDRef_ = multiplierNode.Attributes["id"].Value; XsdTypePositiveInteger ob = new XsdTypePositiveInteger(multiplierNode); IDManager.SetID(multiplierIDRef_, ob); } else if (multiplierNode.Attributes["href"] != null) { multiplierIDRef_ = multiplierNode.Attributes["href"].Value; } else { multiplier_ = new XsdTypePositiveInteger(multiplierNode); } } else { multiplier_ = new XsdTypePositiveInteger(multiplierNode); } } XmlNode futureContractReferenceNode = xmlNode.SelectSingleNode("futureContractReference"); if (futureContractReferenceNode != null) { if (futureContractReferenceNode.Attributes["href"] != null || futureContractReferenceNode.Attributes["id"] != null) { if (futureContractReferenceNode.Attributes["id"] != null) { futureContractReferenceIDRef_ = futureContractReferenceNode.Attributes["id"].Value; XsdTypeString ob = new XsdTypeString(futureContractReferenceNode); IDManager.SetID(futureContractReferenceIDRef_, ob); } else if (futureContractReferenceNode.Attributes["href"] != null) { futureContractReferenceIDRef_ = futureContractReferenceNode.Attributes["href"].Value; } else { futureContractReference_ = new XsdTypeString(futureContractReferenceNode); } } else { futureContractReference_ = new XsdTypeString(futureContractReferenceNode); } } 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); } } }
public ExternalDocument(XmlNode xmlNode) { XmlNodeList mimeTypeNodeList = xmlNode.SelectNodes("mimeType"); if (mimeTypeNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in mimeTypeNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { mimeTypeIDRef = item.Attributes["id"].Name; MimeType ob = MimeType(); IDManager.SetID(mimeTypeIDRef, ob); } else if (item.Attributes.ToString() == "href") { mimeTypeIDRef = item.Attributes["href"].Name; } else { mimeType = new MimeType(item); } } } XmlNodeList stringNodeList = xmlNode.SelectNodes("string"); if (stringNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in stringNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { stringIDRef = item.Attributes["id"].Name; XsdTypeString ob = XsdTypeString(); IDManager.SetID(stringIDRef, ob); } else if (item.Attributes.ToString() == "href") { stringIDRef = item.Attributes["href"].Name; } else { string = new XsdTypeString(item); } } } XmlNodeList hexadecimalBinaryNodeList = xmlNode.SelectNodes("hexadecimalBinary"); if (hexadecimalBinaryNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in hexadecimalBinaryNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { hexadecimalBinaryIDRef = item.Attributes["id"].Name; XsdTypeHexBinary ob = XsdTypeHexBinary(); IDManager.SetID(hexadecimalBinaryIDRef, ob); } else if (item.Attributes.ToString() == "href") { hexadecimalBinaryIDRef = item.Attributes["href"].Name; } else { hexadecimalBinary = new XsdTypeHexBinary(item); } } } XmlNodeList base64BinaryNodeList = xmlNode.SelectNodes("base64Binary"); if (base64BinaryNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in base64BinaryNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { base64BinaryIDRef = item.Attributes["id"].Name; XsdTypeBase64Binary ob = XsdTypeBase64Binary(); IDManager.SetID(base64BinaryIDRef, ob); } else if (item.Attributes.ToString() == "href") { base64BinaryIDRef = item.Attributes["href"].Name; } else { base64Binary = new XsdTypeBase64Binary(item); } } } XmlNodeList urlNodeList = xmlNode.SelectNodes("url"); if (urlNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in urlNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { urlIDRef = item.Attributes["id"].Name; XsdTypeAnyURI ob = XsdTypeAnyURI(); IDManager.SetID(urlIDRef, ob); } else if (item.Attributes.ToString() == "href") { urlIDRef = item.Attributes["href"].Name; } else { url = new XsdTypeAnyURI(item); } } } XmlNodeList attachmentReferenceNodeList = xmlNode.SelectNodes("attachmentReference"); if (attachmentReferenceNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in attachmentReferenceNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { attachmentReferenceIDRef = item.Attributes["id"].Name; HTTPAttachmentReference ob = HTTPAttachmentReference(); IDManager.SetID(attachmentReferenceIDRef, ob); } else if (item.Attributes.ToString() == "href") { attachmentReferenceIDRef = item.Attributes["href"].Name; } else { attachmentReference = new HTTPAttachmentReference(item); } } } }
public IdentifiedAsset(XmlNode xmlNode) : base(xmlNode) { XmlNodeList instrumentIdNodeList = xmlNode.SelectNodes("instrumentId"); if (instrumentIdNodeList != null) { this.instrumentId_ = new List<InstrumentId>(); foreach (XmlNode item in instrumentIdNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] != null) { if (item.Attributes["id"] != null) { instrumentIdIDRef_ = item.Attributes["id"].Value; instrumentId_.Add(new InstrumentId(item)); IDManager.SetID(instrumentIdIDRef_, instrumentId_[instrumentId_.Count - 1 ]); } else if (item.Attributes["href"] != null) { instrumentIdIDRef_ = item.Attributes["href"].Value; } else { instrumentId_.Add(new InstrumentId(item)); } } else { instrumentId_.Add(new InstrumentId(item)); } } } XmlNode descriptionNode = xmlNode.SelectSingleNode("description"); if (descriptionNode != null) { if (descriptionNode.Attributes["href"] != null || descriptionNode.Attributes["id"] != null) { if (descriptionNode.Attributes["id"] != null) { descriptionIDRef_ = descriptionNode.Attributes["id"].Value; XsdTypeString ob = new XsdTypeString(descriptionNode); IDManager.SetID(descriptionIDRef_, ob); } else if (descriptionNode.Attributes["href"] != null) { descriptionIDRef_ = descriptionNode.Attributes["href"].Value; } else { description_ = new XsdTypeString(descriptionNode); } } else { description_ = new XsdTypeString(descriptionNode); } } }
public BusinessUnit(XmlNode xmlNode) { XmlNode nameNode = xmlNode.SelectSingleNode("name"); if (nameNode != null) { if (nameNode.Attributes["href"] != null || nameNode.Attributes["id"] != null) { if (nameNode.Attributes["id"] != null) { nameIDRef_ = nameNode.Attributes["id"].Value; XsdTypeString ob = new XsdTypeString(nameNode); IDManager.SetID(nameIDRef_, ob); } else if (nameNode.Attributes["href"] != null) { nameIDRef_ = nameNode.Attributes["href"].Value; } else { name_ = new XsdTypeString(nameNode); } } else { name_ = new XsdTypeString(nameNode); } } XmlNode businessUnitIdNode = xmlNode.SelectSingleNode("businessUnitId"); if (businessUnitIdNode != null) { if (businessUnitIdNode.Attributes["href"] != null || businessUnitIdNode.Attributes["id"] != null) { if (businessUnitIdNode.Attributes["id"] != null) { businessUnitIdIDRef_ = businessUnitIdNode.Attributes["id"].Value; Unit ob = new Unit(businessUnitIdNode); IDManager.SetID(businessUnitIdIDRef_, ob); } else if (businessUnitIdNode.Attributes["href"] != null) { businessUnitIdIDRef_ = businessUnitIdNode.Attributes["href"].Value; } else { businessUnitId_ = new Unit(businessUnitIdNode); } } else { businessUnitId_ = new Unit(businessUnitIdNode); } } XmlNode contactInfoNode = xmlNode.SelectSingleNode("contactInfo"); if (contactInfoNode != null) { if (contactInfoNode.Attributes["href"] != null || contactInfoNode.Attributes["id"] != null) { if (contactInfoNode.Attributes["id"] != null) { contactInfoIDRef_ = contactInfoNode.Attributes["id"].Value; ContactInformation ob = new ContactInformation(contactInfoNode); IDManager.SetID(contactInfoIDRef_, ob); } else if (contactInfoNode.Attributes["href"] != null) { contactInfoIDRef_ = contactInfoNode.Attributes["href"].Value; } else { contactInfo_ = new ContactInformation(contactInfoNode); } } else { contactInfo_ = new ContactInformation(contactInfoNode); } } XmlNode countryNode = xmlNode.SelectSingleNode("country"); if (countryNode != null) { if (countryNode.Attributes["href"] != null || countryNode.Attributes["id"] != null) { if (countryNode.Attributes["id"] != null) { countryIDRef_ = countryNode.Attributes["id"].Value; CountryCode ob = new CountryCode(countryNode); IDManager.SetID(countryIDRef_, ob); } else if (countryNode.Attributes["href"] != null) { countryIDRef_ = countryNode.Attributes["href"].Value; } else { country_ = new CountryCode(countryNode); } } else { country_ = new CountryCode(countryNode); } } }
public TradeDifference(XmlNode xmlNode) { XmlNode differenceTypeNode = xmlNode.SelectSingleNode("differenceType"); if (differenceTypeNode != null) { if (differenceTypeNode.Attributes["href"] != null || differenceTypeNode.Attributes["id"] != null) { if (differenceTypeNode.Attributes["id"] != null) { differenceTypeIDRef_ = differenceTypeNode.Attributes["id"].Value; DifferenceTypeEnum ob = new DifferenceTypeEnum(differenceTypeNode); IDManager.SetID(differenceTypeIDRef_, ob); } else if (differenceTypeNode.Attributes["href"] != null) { differenceTypeIDRef_ = differenceTypeNode.Attributes["href"].Value; } else { differenceType_ = new DifferenceTypeEnum(differenceTypeNode); } } else { differenceType_ = new DifferenceTypeEnum(differenceTypeNode); } } XmlNode differenceSeverityNode = xmlNode.SelectSingleNode("differenceSeverity"); if (differenceSeverityNode != null) { if (differenceSeverityNode.Attributes["href"] != null || differenceSeverityNode.Attributes["id"] != null) { if (differenceSeverityNode.Attributes["id"] != null) { differenceSeverityIDRef_ = differenceSeverityNode.Attributes["id"].Value; DifferenceSeverityEnum ob = new DifferenceSeverityEnum(differenceSeverityNode); IDManager.SetID(differenceSeverityIDRef_, ob); } else if (differenceSeverityNode.Attributes["href"] != null) { differenceSeverityIDRef_ = differenceSeverityNode.Attributes["href"].Value; } else { differenceSeverity_ = new DifferenceSeverityEnum(differenceSeverityNode); } } else { differenceSeverity_ = new DifferenceSeverityEnum(differenceSeverityNode); } } XmlNode elementNode = xmlNode.SelectSingleNode("element"); if (elementNode != null) { if (elementNode.Attributes["href"] != null || elementNode.Attributes["id"] != null) { if (elementNode.Attributes["id"] != null) { elementIDRef_ = elementNode.Attributes["id"].Value; XsdTypeString ob = new XsdTypeString(elementNode); IDManager.SetID(elementIDRef_, ob); } else if (elementNode.Attributes["href"] != null) { elementIDRef_ = elementNode.Attributes["href"].Value; } else { element_ = new XsdTypeString(elementNode); } } else { element_ = new XsdTypeString(elementNode); } } XmlNode basePathNode = xmlNode.SelectSingleNode("basePath"); if (basePathNode != null) { if (basePathNode.Attributes["href"] != null || basePathNode.Attributes["id"] != null) { if (basePathNode.Attributes["id"] != null) { basePathIDRef_ = basePathNode.Attributes["id"].Value; XsdTypeString ob = new XsdTypeString(basePathNode); IDManager.SetID(basePathIDRef_, ob); } else if (basePathNode.Attributes["href"] != null) { basePathIDRef_ = basePathNode.Attributes["href"].Value; } else { basePath_ = new XsdTypeString(basePathNode); } } else { basePath_ = new XsdTypeString(basePathNode); } } XmlNode baseValueNode = xmlNode.SelectSingleNode("baseValue"); if (baseValueNode != null) { if (baseValueNode.Attributes["href"] != null || baseValueNode.Attributes["id"] != null) { if (baseValueNode.Attributes["id"] != null) { baseValueIDRef_ = baseValueNode.Attributes["id"].Value; XsdTypeString ob = new XsdTypeString(baseValueNode); IDManager.SetID(baseValueIDRef_, ob); } else if (baseValueNode.Attributes["href"] != null) { baseValueIDRef_ = baseValueNode.Attributes["href"].Value; } else { baseValue_ = new XsdTypeString(baseValueNode); } } else { baseValue_ = new XsdTypeString(baseValueNode); } } XmlNode otherPathNode = xmlNode.SelectSingleNode("otherPath"); if (otherPathNode != null) { if (otherPathNode.Attributes["href"] != null || otherPathNode.Attributes["id"] != null) { if (otherPathNode.Attributes["id"] != null) { otherPathIDRef_ = otherPathNode.Attributes["id"].Value; XsdTypeString ob = new XsdTypeString(otherPathNode); IDManager.SetID(otherPathIDRef_, ob); } else if (otherPathNode.Attributes["href"] != null) { otherPathIDRef_ = otherPathNode.Attributes["href"].Value; } else { otherPath_ = new XsdTypeString(otherPathNode); } } else { otherPath_ = new XsdTypeString(otherPathNode); } } XmlNode otherValueNode = xmlNode.SelectSingleNode("otherValue"); if (otherValueNode != null) { if (otherValueNode.Attributes["href"] != null || otherValueNode.Attributes["id"] != null) { if (otherValueNode.Attributes["id"] != null) { otherValueIDRef_ = otherValueNode.Attributes["id"].Value; XsdTypeString ob = new XsdTypeString(otherValueNode); IDManager.SetID(otherValueIDRef_, ob); } else if (otherValueNode.Attributes["href"] != null) { otherValueIDRef_ = otherValueNode.Attributes["href"].Value; } else { otherValue_ = new XsdTypeString(otherValueNode); } } else { otherValue_ = new XsdTypeString(otherValueNode); } } XmlNodeList missingElementNodeList = xmlNode.SelectNodes("missingElement"); if (missingElementNodeList != null) { this.missingElement_ = new List<XsdTypeString>(); foreach (XmlNode item in missingElementNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] != null) { if (item.Attributes["id"] != null) { missingElementIDRef_ = item.Attributes["id"].Value; missingElement_.Add(new XsdTypeString(item)); IDManager.SetID(missingElementIDRef_, missingElement_[missingElement_.Count - 1 ]); } else if (item.Attributes["href"] != null) { missingElementIDRef_ = item.Attributes["href"].Value; } else { missingElement_.Add(new XsdTypeString(item)); } } else { missingElement_.Add(new XsdTypeString(item)); } } } XmlNodeList extraElementNodeList = xmlNode.SelectNodes("extraElement"); if (extraElementNodeList != null) { this.extraElement_ = new List<XsdTypeString>(); foreach (XmlNode item in extraElementNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] != null) { if (item.Attributes["id"] != null) { extraElementIDRef_ = item.Attributes["id"].Value; extraElement_.Add(new XsdTypeString(item)); IDManager.SetID(extraElementIDRef_, extraElement_[extraElement_.Count - 1 ]); } else if (item.Attributes["href"] != null) { extraElementIDRef_ = item.Attributes["href"].Value; } else { extraElement_.Add(new XsdTypeString(item)); } } else { extraElement_.Add(new XsdTypeString(item)); } } } XmlNode messageNode = xmlNode.SelectSingleNode("message"); if (messageNode != null) { if (messageNode.Attributes["href"] != null || messageNode.Attributes["id"] != null) { if (messageNode.Attributes["id"] != null) { messageIDRef_ = messageNode.Attributes["id"].Value; XsdTypeString ob = new XsdTypeString(messageNode); IDManager.SetID(messageIDRef_, ob); } else if (messageNode.Attributes["href"] != null) { messageIDRef_ = messageNode.Attributes["href"].Value; } else { message_ = new XsdTypeString(messageNode); } } else { message_ = new XsdTypeString(messageNode); } } }
public AdditionalData(XmlNode xmlNode) { XmlNodeList mimeTypeNodeList = xmlNode.SelectNodes("mimeType"); if (mimeTypeNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in mimeTypeNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { mimeTypeIDRef = item.Attributes["id"].Name; MimeType ob = MimeType(); IDManager.SetID(mimeTypeIDRef, ob); } else if (item.Attributes.ToString() == "href") { mimeTypeIDRef = item.Attributes["href"].Name; } else { mimeType = new MimeType(item); } } } XmlNodeList stringNodeList = xmlNode.SelectNodes("string"); if (stringNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in stringNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { stringIDRef = item.Attributes["id"].Name; XsdTypeString ob = XsdTypeString(); IDManager.SetID(stringIDRef, ob); } else if (item.Attributes.ToString() == "href") { stringIDRef = item.Attributes["href"].Name; } else { string = new XsdTypeString(item); } } } XmlNodeList hexadecimalBinaryNodeList = xmlNode.SelectNodes("hexadecimalBinary"); if (hexadecimalBinaryNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in hexadecimalBinaryNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { hexadecimalBinaryIDRef = item.Attributes["id"].Name; XsdTypeHexBinary ob = XsdTypeHexBinary(); IDManager.SetID(hexadecimalBinaryIDRef, ob); } else if (item.Attributes.ToString() == "href") { hexadecimalBinaryIDRef = item.Attributes["href"].Name; } else { hexadecimalBinary = new XsdTypeHexBinary(item); } } } XmlNodeList base64BinaryNodeList = xmlNode.SelectNodes("base64Binary"); if (base64BinaryNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in base64BinaryNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { base64BinaryIDRef = item.Attributes["id"].Name; XsdTypeBase64Binary ob = XsdTypeBase64Binary(); IDManager.SetID(base64BinaryIDRef, ob); } else if (item.Attributes.ToString() == "href") { base64BinaryIDRef = item.Attributes["href"].Name; } else { base64Binary = new XsdTypeBase64Binary(item); } } } XmlNodeList originalMessageNodeList = xmlNode.SelectNodes("originalMessage"); if (originalMessageNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in originalMessageNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { originalMessageIDRef = item.Attributes["id"].Name; XsdTypeBoolean ob = XsdTypeBoolean(); IDManager.SetID(originalMessageIDRef, ob); } else if (item.Attributes.ToString() == "href") { originalMessageIDRef = item.Attributes["href"].Name; } else { originalMessage = new XsdTypeBoolean(item); } } } }
public ValuationSet(XmlNode xmlNode) { XmlNode nameNode = xmlNode.SelectSingleNode("name"); if (nameNode != null) { if (nameNode.Attributes["href"] != null || nameNode.Attributes["id"] != null) { if (nameNode.Attributes["id"] != null) { nameIDRef_ = nameNode.Attributes["id"].Value; XsdTypeString ob = new XsdTypeString(nameNode); IDManager.SetID(nameIDRef_, ob); } else if (nameNode.Attributes["href"] != null) { nameIDRef_ = nameNode.Attributes["href"].Value; } else { name_ = new XsdTypeString(nameNode); } } else { name_ = new XsdTypeString(nameNode); } } XmlNodeList valuationScenarioNodeList = xmlNode.SelectNodes("valuationScenario"); if (valuationScenarioNodeList != null) { this.valuationScenario_ = new List<ValuationScenario>(); foreach (XmlNode item in valuationScenarioNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] != null) { if (item.Attributes["id"] != null) { valuationScenarioIDRef_ = item.Attributes["id"].Value; valuationScenario_.Add(new ValuationScenario(item)); IDManager.SetID(valuationScenarioIDRef_, valuationScenario_[valuationScenario_.Count - 1 ]); } else if (item.Attributes["href"] != null) { valuationScenarioIDRef_ = item.Attributes["href"].Value; } else { valuationScenario_.Add(new ValuationScenario(item)); } } else { valuationScenario_.Add(new ValuationScenario(item)); } } } XmlNodeList valuationScenarioReferenceNodeList = xmlNode.SelectNodes("valuationScenarioReference"); if (valuationScenarioReferenceNodeList != null) { this.valuationScenarioReference_ = new List<ValuationScenarioReference>(); foreach (XmlNode item in valuationScenarioReferenceNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] != null) { if (item.Attributes["id"] != null) { valuationScenarioReferenceIDRef_ = item.Attributes["id"].Value; valuationScenarioReference_.Add(new ValuationScenarioReference(item)); IDManager.SetID(valuationScenarioReferenceIDRef_, valuationScenarioReference_[valuationScenarioReference_.Count - 1 ]); } else if (item.Attributes["href"] != null) { valuationScenarioReferenceIDRef_ = item.Attributes["href"].Value; } else { valuationScenarioReference_.Add(new ValuationScenarioReference(item)); } } else { valuationScenarioReference_.Add(new ValuationScenarioReference(item)); } } } XmlNode basePartyNode = xmlNode.SelectSingleNode("baseParty"); if (basePartyNode != null) { if (basePartyNode.Attributes["href"] != null || basePartyNode.Attributes["id"] != null) { if (basePartyNode.Attributes["id"] != null) { basePartyIDRef_ = basePartyNode.Attributes["id"].Value; PartyReference ob = new PartyReference(basePartyNode); IDManager.SetID(basePartyIDRef_, ob); } else if (basePartyNode.Attributes["href"] != null) { basePartyIDRef_ = basePartyNode.Attributes["href"].Value; } else { baseParty_ = new PartyReference(basePartyNode); } } else { baseParty_ = new PartyReference(basePartyNode); } } XmlNodeList quotationCharacteristicsNodeList = xmlNode.SelectNodes("quotationCharacteristics"); if (quotationCharacteristicsNodeList != null) { this.quotationCharacteristics_ = new List<QuotationCharacteristics>(); foreach (XmlNode item in quotationCharacteristicsNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] != null) { if (item.Attributes["id"] != null) { quotationCharacteristicsIDRef_ = item.Attributes["id"].Value; quotationCharacteristics_.Add(new QuotationCharacteristics(item)); IDManager.SetID(quotationCharacteristicsIDRef_, quotationCharacteristics_[quotationCharacteristics_.Count - 1 ]); } else if (item.Attributes["href"] != null) { quotationCharacteristicsIDRef_ = item.Attributes["href"].Value; } else { quotationCharacteristics_.Add(new QuotationCharacteristics(item)); } } else { quotationCharacteristics_.Add(new QuotationCharacteristics(item)); } } } XmlNodeList sensitivitySetDefinitionNodeList = xmlNode.SelectNodes("sensitivitySetDefinition"); if (sensitivitySetDefinitionNodeList != null) { this.sensitivitySetDefinition_ = new List<SensitivitySetDefinition>(); foreach (XmlNode item in sensitivitySetDefinitionNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] != null) { if (item.Attributes["id"] != null) { sensitivitySetDefinitionIDRef_ = item.Attributes["id"].Value; sensitivitySetDefinition_.Add(new SensitivitySetDefinition(item)); IDManager.SetID(sensitivitySetDefinitionIDRef_, sensitivitySetDefinition_[sensitivitySetDefinition_.Count - 1 ]); } else if (item.Attributes["href"] != null) { sensitivitySetDefinitionIDRef_ = item.Attributes["href"].Value; } else { sensitivitySetDefinition_.Add(new SensitivitySetDefinition(item)); } } else { sensitivitySetDefinition_.Add(new SensitivitySetDefinition(item)); } } } XmlNode detailNode = xmlNode.SelectSingleNode("detail"); if (detailNode != null) { if (detailNode.Attributes["href"] != null || detailNode.Attributes["id"] != null) { if (detailNode.Attributes["id"] != null) { detailIDRef_ = detailNode.Attributes["id"].Value; ValuationSetDetail ob = new ValuationSetDetail(detailNode); IDManager.SetID(detailIDRef_, ob); } else if (detailNode.Attributes["href"] != null) { detailIDRef_ = detailNode.Attributes["href"].Value; } else { detail_ = new ValuationSetDetail(detailNode); } } else { detail_ = new ValuationSetDetail(detailNode); } } XmlNodeList assetValuationNodeList = xmlNode.SelectNodes("assetValuation"); if (assetValuationNodeList != null) { this.assetValuation_ = new List<AssetValuation>(); foreach (XmlNode item in assetValuationNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] != null) { if (item.Attributes["id"] != null) { assetValuationIDRef_ = item.Attributes["id"].Value; assetValuation_.Add(new AssetValuation(item)); IDManager.SetID(assetValuationIDRef_, assetValuation_[assetValuation_.Count - 1 ]); } else if (item.Attributes["href"] != null) { assetValuationIDRef_ = item.Attributes["href"].Value; } else { assetValuation_.Add(new AssetValuation(item)); } } else { assetValuation_.Add(new AssetValuation(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 FxAsianFeature(XmlNode xmlNode) { XmlNode primaryRateSourceNode = xmlNode.SelectSingleNode("primaryRateSource"); if (primaryRateSourceNode != null) { if (primaryRateSourceNode.Attributes["href"] != null || primaryRateSourceNode.Attributes["id"] != null) { if (primaryRateSourceNode.Attributes["id"] != null) { primaryRateSourceIDRef_ = primaryRateSourceNode.Attributes["id"].Value; InformationSource ob = new InformationSource(primaryRateSourceNode); IDManager.SetID(primaryRateSourceIDRef_, ob); } else if (primaryRateSourceNode.Attributes["href"] != null) { primaryRateSourceIDRef_ = primaryRateSourceNode.Attributes["href"].Value; } else { primaryRateSource_ = new InformationSource(primaryRateSourceNode); } } else { primaryRateSource_ = new InformationSource(primaryRateSourceNode); } } XmlNode secondaryRateSourceNode = xmlNode.SelectSingleNode("secondaryRateSource"); if (secondaryRateSourceNode != null) { if (secondaryRateSourceNode.Attributes["href"] != null || secondaryRateSourceNode.Attributes["id"] != null) { if (secondaryRateSourceNode.Attributes["id"] != null) { secondaryRateSourceIDRef_ = secondaryRateSourceNode.Attributes["id"].Value; InformationSource ob = new InformationSource(secondaryRateSourceNode); IDManager.SetID(secondaryRateSourceIDRef_, ob); } else if (secondaryRateSourceNode.Attributes["href"] != null) { secondaryRateSourceIDRef_ = secondaryRateSourceNode.Attributes["href"].Value; } else { secondaryRateSource_ = new InformationSource(secondaryRateSourceNode); } } else { secondaryRateSource_ = new InformationSource(secondaryRateSourceNode); } } XmlNode fixingTimeNode = xmlNode.SelectSingleNode("fixingTime"); if (fixingTimeNode != null) { if (fixingTimeNode.Attributes["href"] != null || fixingTimeNode.Attributes["id"] != null) { if (fixingTimeNode.Attributes["id"] != null) { fixingTimeIDRef_ = fixingTimeNode.Attributes["id"].Value; BusinessCenterTime ob = new BusinessCenterTime(fixingTimeNode); IDManager.SetID(fixingTimeIDRef_, ob); } else if (fixingTimeNode.Attributes["href"] != null) { fixingTimeIDRef_ = fixingTimeNode.Attributes["href"].Value; } else { fixingTime_ = new BusinessCenterTime(fixingTimeNode); } } else { fixingTime_ = new BusinessCenterTime(fixingTimeNode); } } XmlNode observationScheduleNode = xmlNode.SelectSingleNode("observationSchedule"); if (observationScheduleNode != null) { if (observationScheduleNode.Attributes["href"] != null || observationScheduleNode.Attributes["id"] != null) { if (observationScheduleNode.Attributes["id"] != null) { observationScheduleIDRef_ = observationScheduleNode.Attributes["id"].Value; FxAverageRateObservationSchedule ob = new FxAverageRateObservationSchedule(observationScheduleNode); IDManager.SetID(observationScheduleIDRef_, ob); } else if (observationScheduleNode.Attributes["href"] != null) { observationScheduleIDRef_ = observationScheduleNode.Attributes["href"].Value; } else { observationSchedule_ = new FxAverageRateObservationSchedule(observationScheduleNode); } } else { observationSchedule_ = new FxAverageRateObservationSchedule(observationScheduleNode); } } XmlNodeList rateObservationNodeList = xmlNode.SelectNodes("rateObservation"); if (rateObservationNodeList != null) { this.rateObservation_ = new List <FxAverageRateObservation>(); foreach (XmlNode item in rateObservationNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] != null) { if (item.Attributes["id"] != null) { rateObservationIDRef_ = item.Attributes["id"].Value; rateObservation_.Add(new FxAverageRateObservation(item)); IDManager.SetID(rateObservationIDRef_, rateObservation_[rateObservation_.Count - 1]); } else if (item.Attributes["href"] != null) { rateObservationIDRef_ = item.Attributes["href"].Value; } else { rateObservation_.Add(new FxAverageRateObservation(item)); } } else { rateObservation_.Add(new FxAverageRateObservation(item)); } } } XmlNode rateObservationQuoteBasisNode = xmlNode.SelectSingleNode("rateObservationQuoteBasis"); if (rateObservationQuoteBasisNode != null) { if (rateObservationQuoteBasisNode.Attributes["href"] != null || rateObservationQuoteBasisNode.Attributes["id"] != null) { if (rateObservationQuoteBasisNode.Attributes["id"] != null) { rateObservationQuoteBasisIDRef_ = rateObservationQuoteBasisNode.Attributes["id"].Value; StrikeQuoteBasisEnum ob = new StrikeQuoteBasisEnum(rateObservationQuoteBasisNode); IDManager.SetID(rateObservationQuoteBasisIDRef_, ob); } else if (rateObservationQuoteBasisNode.Attributes["href"] != null) { rateObservationQuoteBasisIDRef_ = rateObservationQuoteBasisNode.Attributes["href"].Value; } else { rateObservationQuoteBasis_ = new StrikeQuoteBasisEnum(rateObservationQuoteBasisNode); } } else { rateObservationQuoteBasis_ = new StrikeQuoteBasisEnum(rateObservationQuoteBasisNode); } } XmlNode payoutFormulaNode = xmlNode.SelectSingleNode("payoutFormula"); if (payoutFormulaNode != null) { if (payoutFormulaNode.Attributes["href"] != null || payoutFormulaNode.Attributes["id"] != null) { if (payoutFormulaNode.Attributes["id"] != null) { payoutFormulaIDRef_ = payoutFormulaNode.Attributes["id"].Value; XsdTypeString ob = new XsdTypeString(payoutFormulaNode); IDManager.SetID(payoutFormulaIDRef_, ob); } else if (payoutFormulaNode.Attributes["href"] != null) { payoutFormulaIDRef_ = payoutFormulaNode.Attributes["href"].Value; } else { payoutFormula_ = new XsdTypeString(payoutFormulaNode); } } else { payoutFormula_ = new XsdTypeString(payoutFormulaNode); } } XmlNode precisionNode = xmlNode.SelectSingleNode("precision"); if (precisionNode != null) { if (precisionNode.Attributes["href"] != null || precisionNode.Attributes["id"] != null) { if (precisionNode.Attributes["id"] != null) { precisionIDRef_ = precisionNode.Attributes["id"].Value; XsdTypeNonNegativeInteger ob = new XsdTypeNonNegativeInteger(precisionNode); IDManager.SetID(precisionIDRef_, ob); } else if (precisionNode.Attributes["href"] != null) { precisionIDRef_ = precisionNode.Attributes["href"].Value; } else { precision_ = new XsdTypeNonNegativeInteger(precisionNode); } } else { precision_ = new XsdTypeNonNegativeInteger(precisionNode); } } }
public SensitivitySet(XmlNode xmlNode) { XmlNodeList nameNodeList = xmlNode.SelectNodes("name"); if (nameNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in nameNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { nameIDRef = item.Attributes["id"].Name; XsdTypeString ob = XsdTypeString(); IDManager.SetID(nameIDRef, ob); } else if (item.Attributes.ToString() == "href") { nameIDRef = item.Attributes["href"].Name; } else { name = new XsdTypeString(item); } } } XmlNodeList definitionReferenceNodeList = xmlNode.SelectNodes("definitionReference"); if (definitionReferenceNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in definitionReferenceNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { definitionReferenceIDRef = item.Attributes["id"].Name; SensitivitySetDefinitionReference ob = SensitivitySetDefinitionReference(); IDManager.SetID(definitionReferenceIDRef, ob); } else if (item.Attributes.ToString() == "href") { definitionReferenceIDRef = item.Attributes["href"].Name; } else { definitionReference = new SensitivitySetDefinitionReference(item); } } } XmlNodeList sensitivityNodeList = xmlNode.SelectNodes("sensitivity"); foreach (XmlNode item in sensitivityNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { sensitivityIDRef = item.Attributes["id"].Name; List <Sensitivity> ob = new List <Sensitivity>(); ob.Add(new Sensitivity(item)); IDManager.SetID(sensitivityIDRef, ob); } else if (item.Attributes.ToString() == "href") { sensitivityIDRef = item.Attributes["href"].Name; } else { sensitivity.Add(new Sensitivity(item)); } } } }
public CommodityInformationSource(XmlNode xmlNode) { XmlNodeList rateSourceNodeList = xmlNode.SelectNodes("rateSource"); if (rateSourceNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in rateSourceNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { rateSourceIDRef = item.Attributes["id"].Name; CommodityInformationProvider ob = CommodityInformationProvider(); IDManager.SetID(rateSourceIDRef, ob); } else if (item.Attributes.ToString() == "href") { rateSourceIDRef = item.Attributes["href"].Name; } else { rateSource = new CommodityInformationProvider(item); } } } XmlNodeList rateSourcePageNodeList = xmlNode.SelectNodes("rateSourcePage"); if (rateSourcePageNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in rateSourcePageNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { rateSourcePageIDRef = item.Attributes["id"].Name; RateSourcePage ob = RateSourcePage(); IDManager.SetID(rateSourcePageIDRef, ob); } else if (item.Attributes.ToString() == "href") { rateSourcePageIDRef = item.Attributes["href"].Name; } else { rateSourcePage = new RateSourcePage(item); } } } XmlNodeList rateSourcePageHeadingNodeList = xmlNode.SelectNodes("rateSourcePageHeading"); if (rateSourcePageHeadingNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in rateSourcePageHeadingNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { rateSourcePageHeadingIDRef = item.Attributes["id"].Name; XsdTypeString ob = XsdTypeString(); IDManager.SetID(rateSourcePageHeadingIDRef, ob); } else if (item.Attributes.ToString() == "href") { rateSourcePageHeadingIDRef = item.Attributes["href"].Name; } else { rateSourcePageHeading = new XsdTypeString(item); } } } }
public Market(XmlNode xmlNode) { XmlNode nameNode = xmlNode.SelectSingleNode("name"); if (nameNode != null) { if (nameNode.Attributes["href"] != null || nameNode.Attributes["id"] != null) { if (nameNode.Attributes["id"] != null) { nameIDRef_ = nameNode.Attributes["id"].Value; XsdTypeString ob = new XsdTypeString(nameNode); IDManager.SetID(nameIDRef_, ob); } else if (nameNode.Attributes["href"] != null) { nameIDRef_ = nameNode.Attributes["href"].Value; } else { name_ = new XsdTypeString(nameNode); } } else { name_ = new XsdTypeString(nameNode); } } XmlNode benchmarkQuotesNode = xmlNode.SelectSingleNode("benchmarkQuotes"); if (benchmarkQuotesNode != null) { if (benchmarkQuotesNode.Attributes["href"] != null || benchmarkQuotesNode.Attributes["id"] != null) { if (benchmarkQuotesNode.Attributes["id"] != null) { benchmarkQuotesIDRef_ = benchmarkQuotesNode.Attributes["id"].Value; QuotedAssetSet ob = new QuotedAssetSet(benchmarkQuotesNode); IDManager.SetID(benchmarkQuotesIDRef_, ob); } else if (benchmarkQuotesNode.Attributes["href"] != null) { benchmarkQuotesIDRef_ = benchmarkQuotesNode.Attributes["href"].Value; } else { benchmarkQuotes_ = new QuotedAssetSet(benchmarkQuotesNode); } } else { benchmarkQuotes_ = new QuotedAssetSet(benchmarkQuotesNode); } } XmlNode pricingStructureNode = xmlNode.SelectSingleNode("pricingStructure"); if (pricingStructureNode != null) { if (pricingStructureNode.Attributes["href"] != null || pricingStructureNode.Attributes["id"] != null) { if (pricingStructureNode.Attributes["id"] != null) { pricingStructureIDRef_ = pricingStructureNode.Attributes["id"].Value; PricingStructure ob = new PricingStructure(pricingStructureNode); IDManager.SetID(pricingStructureIDRef_, ob); } else if (pricingStructureNode.Attributes["href"] != null) { pricingStructureIDRef_ = pricingStructureNode.Attributes["href"].Value; } else { pricingStructure_ = new PricingStructure(pricingStructureNode); } } else { pricingStructure_ = new PricingStructure(pricingStructureNode); } } XmlNode creditCurveNode = xmlNode.SelectSingleNode("creditCurve"); if (creditCurveNode != null) { if (creditCurveNode.Attributes["href"] != null || creditCurveNode.Attributes["id"] != null) { if (creditCurveNode.Attributes["id"] != null) { creditCurveIDRef_ = creditCurveNode.Attributes["id"].Value; CreditCurve ob = new CreditCurve(creditCurveNode); IDManager.SetID(creditCurveIDRef_, ob); } else if (creditCurveNode.Attributes["href"] != null) { creditCurveIDRef_ = creditCurveNode.Attributes["href"].Value; } else { creditCurve_ = new CreditCurve(creditCurveNode); } } else { creditCurve_ = new CreditCurve(creditCurveNode); } } XmlNode fxCurveNode = xmlNode.SelectSingleNode("fxCurve"); if (fxCurveNode != null) { if (fxCurveNode.Attributes["href"] != null || fxCurveNode.Attributes["id"] != null) { if (fxCurveNode.Attributes["id"] != null) { fxCurveIDRef_ = fxCurveNode.Attributes["id"].Value; FxCurve ob = new FxCurve(fxCurveNode); IDManager.SetID(fxCurveIDRef_, ob); } else if (fxCurveNode.Attributes["href"] != null) { fxCurveIDRef_ = fxCurveNode.Attributes["href"].Value; } else { fxCurve_ = new FxCurve(fxCurveNode); } } else { fxCurve_ = new FxCurve(fxCurveNode); } } XmlNode volatilityRepresentationNode = xmlNode.SelectSingleNode("volatilityRepresentation"); if (volatilityRepresentationNode != null) { if (volatilityRepresentationNode.Attributes["href"] != null || volatilityRepresentationNode.Attributes["id"] != null) { if (volatilityRepresentationNode.Attributes["id"] != null) { volatilityRepresentationIDRef_ = volatilityRepresentationNode.Attributes["id"].Value; VolatilityRepresentation ob = new VolatilityRepresentation(volatilityRepresentationNode); IDManager.SetID(volatilityRepresentationIDRef_, ob); } else if (volatilityRepresentationNode.Attributes["href"] != null) { volatilityRepresentationIDRef_ = volatilityRepresentationNode.Attributes["href"].Value; } else { volatilityRepresentation_ = new VolatilityRepresentation(volatilityRepresentationNode); } } else { volatilityRepresentation_ = new VolatilityRepresentation(volatilityRepresentationNode); } } XmlNode yieldCurveNode = xmlNode.SelectSingleNode("yieldCurve"); if (yieldCurveNode != null) { if (yieldCurveNode.Attributes["href"] != null || yieldCurveNode.Attributes["id"] != null) { if (yieldCurveNode.Attributes["id"] != null) { yieldCurveIDRef_ = yieldCurveNode.Attributes["id"].Value; YieldCurve ob = new YieldCurve(yieldCurveNode); IDManager.SetID(yieldCurveIDRef_, ob); } else if (yieldCurveNode.Attributes["href"] != null) { yieldCurveIDRef_ = yieldCurveNode.Attributes["href"].Value; } else { yieldCurve_ = new YieldCurve(yieldCurveNode); } } else { yieldCurve_ = new YieldCurve(yieldCurveNode); } } XmlNode pricingStructureValuationNode = xmlNode.SelectSingleNode("pricingStructureValuation"); if (pricingStructureValuationNode != null) { if (pricingStructureValuationNode.Attributes["href"] != null || pricingStructureValuationNode.Attributes["id"] != null) { if (pricingStructureValuationNode.Attributes["id"] != null) { pricingStructureValuationIDRef_ = pricingStructureValuationNode.Attributes["id"].Value; PricingStructureValuation ob = new PricingStructureValuation(pricingStructureValuationNode); IDManager.SetID(pricingStructureValuationIDRef_, ob); } else if (pricingStructureValuationNode.Attributes["href"] != null) { pricingStructureValuationIDRef_ = pricingStructureValuationNode.Attributes["href"].Value; } else { pricingStructureValuation_ = new PricingStructureValuation(pricingStructureValuationNode); } } else { pricingStructureValuation_ = new PricingStructureValuation(pricingStructureValuationNode); } } XmlNode creditCurveValuationNode = xmlNode.SelectSingleNode("creditCurveValuation"); if (creditCurveValuationNode != null) { if (creditCurveValuationNode.Attributes["href"] != null || creditCurveValuationNode.Attributes["id"] != null) { if (creditCurveValuationNode.Attributes["id"] != null) { creditCurveValuationIDRef_ = creditCurveValuationNode.Attributes["id"].Value; CreditCurveValuation ob = new CreditCurveValuation(creditCurveValuationNode); IDManager.SetID(creditCurveValuationIDRef_, ob); } else if (creditCurveValuationNode.Attributes["href"] != null) { creditCurveValuationIDRef_ = creditCurveValuationNode.Attributes["href"].Value; } else { creditCurveValuation_ = new CreditCurveValuation(creditCurveValuationNode); } } else { creditCurveValuation_ = new CreditCurveValuation(creditCurveValuationNode); } } XmlNode fxCurveValuationNode = xmlNode.SelectSingleNode("fxCurveValuation"); if (fxCurveValuationNode != null) { if (fxCurveValuationNode.Attributes["href"] != null || fxCurveValuationNode.Attributes["id"] != null) { if (fxCurveValuationNode.Attributes["id"] != null) { fxCurveValuationIDRef_ = fxCurveValuationNode.Attributes["id"].Value; FxCurveValuation ob = new FxCurveValuation(fxCurveValuationNode); IDManager.SetID(fxCurveValuationIDRef_, ob); } else if (fxCurveValuationNode.Attributes["href"] != null) { fxCurveValuationIDRef_ = fxCurveValuationNode.Attributes["href"].Value; } else { fxCurveValuation_ = new FxCurveValuation(fxCurveValuationNode); } } else { fxCurveValuation_ = new FxCurveValuation(fxCurveValuationNode); } } XmlNode volatilityMatrixValuationNode = xmlNode.SelectSingleNode("volatilityMatrixValuation"); if (volatilityMatrixValuationNode != null) { if (volatilityMatrixValuationNode.Attributes["href"] != null || volatilityMatrixValuationNode.Attributes["id"] != null) { if (volatilityMatrixValuationNode.Attributes["id"] != null) { volatilityMatrixValuationIDRef_ = volatilityMatrixValuationNode.Attributes["id"].Value; VolatilityMatrix ob = new VolatilityMatrix(volatilityMatrixValuationNode); IDManager.SetID(volatilityMatrixValuationIDRef_, ob); } else if (volatilityMatrixValuationNode.Attributes["href"] != null) { volatilityMatrixValuationIDRef_ = volatilityMatrixValuationNode.Attributes["href"].Value; } else { volatilityMatrixValuation_ = new VolatilityMatrix(volatilityMatrixValuationNode); } } else { volatilityMatrixValuation_ = new VolatilityMatrix(volatilityMatrixValuationNode); } } XmlNode yieldCurveValuationNode = xmlNode.SelectSingleNode("yieldCurveValuation"); if (yieldCurveValuationNode != null) { if (yieldCurveValuationNode.Attributes["href"] != null || yieldCurveValuationNode.Attributes["id"] != null) { if (yieldCurveValuationNode.Attributes["id"] != null) { yieldCurveValuationIDRef_ = yieldCurveValuationNode.Attributes["id"].Value; YieldCurveValuation ob = new YieldCurveValuation(yieldCurveValuationNode); IDManager.SetID(yieldCurveValuationIDRef_, ob); } else if (yieldCurveValuationNode.Attributes["href"] != null) { yieldCurveValuationIDRef_ = yieldCurveValuationNode.Attributes["href"].Value; } else { yieldCurveValuation_ = new YieldCurveValuation(yieldCurveValuationNode); } } else { yieldCurveValuation_ = new YieldCurveValuation(yieldCurveValuationNode); } } XmlNodeList benchmarkPricingMethodNodeList = xmlNode.SelectNodes("benchmarkPricingMethod"); if (benchmarkPricingMethodNodeList != null) { this.benchmarkPricingMethod_ = new List<PricingMethod>(); foreach (XmlNode item in benchmarkPricingMethodNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] != null) { if (item.Attributes["id"] != null) { benchmarkPricingMethodIDRef_ = item.Attributes["id"].Value; benchmarkPricingMethod_.Add(new PricingMethod(item)); IDManager.SetID(benchmarkPricingMethodIDRef_, benchmarkPricingMethod_[benchmarkPricingMethod_.Count - 1 ]); } else if (item.Attributes["href"] != null) { benchmarkPricingMethodIDRef_ = item.Attributes["href"].Value; } else { benchmarkPricingMethod_.Add(new PricingMethod(item)); } } else { benchmarkPricingMethod_.Add(new PricingMethod(item)); } } } }
public SensitivityDefinition(XmlNode xmlNode) { XmlNode nameNode = xmlNode.SelectSingleNode("name"); if (nameNode != null) { if (nameNode.Attributes["href"] != null || nameNode.Attributes["id"] != null) { if (nameNode.Attributes["id"] != null) { nameIDRef_ = nameNode.Attributes["id"].Value; XsdTypeString ob = new XsdTypeString(nameNode); IDManager.SetID(nameIDRef_, ob); } else if (nameNode.Attributes["href"] != null) { nameIDRef_ = nameNode.Attributes["href"].Value; } else { name_ = new XsdTypeString(nameNode); } } else { name_ = new XsdTypeString(nameNode); } } XmlNode valuationScenarioReferenceNode = xmlNode.SelectSingleNode("valuationScenarioReference"); if (valuationScenarioReferenceNode != null) { if (valuationScenarioReferenceNode.Attributes["href"] != null || valuationScenarioReferenceNode.Attributes["id"] != null) { if (valuationScenarioReferenceNode.Attributes["id"] != null) { valuationScenarioReferenceIDRef_ = valuationScenarioReferenceNode.Attributes["id"].Value; ValuationScenarioReference ob = new ValuationScenarioReference(valuationScenarioReferenceNode); IDManager.SetID(valuationScenarioReferenceIDRef_, ob); } else if (valuationScenarioReferenceNode.Attributes["href"] != null) { valuationScenarioReferenceIDRef_ = valuationScenarioReferenceNode.Attributes["href"].Value; } else { valuationScenarioReference_ = new ValuationScenarioReference(valuationScenarioReferenceNode); } } else { valuationScenarioReference_ = new ValuationScenarioReference(valuationScenarioReferenceNode); } } XmlNodeList partialDerivativeNodeList = xmlNode.SelectNodes("partialDerivative"); if (partialDerivativeNodeList != null) { this.partialDerivative_ = new List<PricingParameterDerivative>(); foreach (XmlNode item in partialDerivativeNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] != null) { if (item.Attributes["id"] != null) { partialDerivativeIDRef_ = item.Attributes["id"].Value; partialDerivative_.Add(new PricingParameterDerivative(item)); IDManager.SetID(partialDerivativeIDRef_, partialDerivative_[partialDerivative_.Count - 1 ]); } else if (item.Attributes["href"] != null) { partialDerivativeIDRef_ = item.Attributes["href"].Value; } else { partialDerivative_.Add(new PricingParameterDerivative(item)); } } else { partialDerivative_.Add(new PricingParameterDerivative(item)); } } } XmlNode formulaNode = xmlNode.SelectSingleNode("formula"); if (formulaNode != null) { if (formulaNode.Attributes["href"] != null || formulaNode.Attributes["id"] != null) { if (formulaNode.Attributes["id"] != null) { formulaIDRef_ = formulaNode.Attributes["id"].Value; DerivativeFormula ob = new DerivativeFormula(formulaNode); IDManager.SetID(formulaIDRef_, ob); } else if (formulaNode.Attributes["href"] != null) { formulaIDRef_ = formulaNode.Attributes["href"].Value; } else { formula_ = new DerivativeFormula(formulaNode); } } else { formula_ = new DerivativeFormula(formulaNode); } } 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; TimeDimension ob = new TimeDimension(termNode); IDManager.SetID(termIDRef_, ob); } else if (termNode.Attributes["href"] != null) { termIDRef_ = termNode.Attributes["href"].Value; } else { term_ = new TimeDimension(termNode); } } else { term_ = new TimeDimension(termNode); } } XmlNode coordinateNode = xmlNode.SelectSingleNode("coordinate"); if (coordinateNode != null) { if (coordinateNode.Attributes["href"] != null || coordinateNode.Attributes["id"] != null) { if (coordinateNode.Attributes["id"] != null) { coordinateIDRef_ = coordinateNode.Attributes["id"].Value; PricingDataPointCoordinate ob = new PricingDataPointCoordinate(coordinateNode); IDManager.SetID(coordinateIDRef_, ob); } else if (coordinateNode.Attributes["href"] != null) { coordinateIDRef_ = coordinateNode.Attributes["href"].Value; } else { coordinate_ = new PricingDataPointCoordinate(coordinateNode); } } else { coordinate_ = new PricingDataPointCoordinate(coordinateNode); } } XmlNode coordinateReferenceNode = xmlNode.SelectSingleNode("coordinateReference"); if (coordinateReferenceNode != null) { if (coordinateReferenceNode.Attributes["href"] != null || coordinateReferenceNode.Attributes["id"] != null) { if (coordinateReferenceNode.Attributes["id"] != null) { coordinateReferenceIDRef_ = coordinateReferenceNode.Attributes["id"].Value; PricingDataPointCoordinateReference ob = new PricingDataPointCoordinateReference(coordinateReferenceNode); IDManager.SetID(coordinateReferenceIDRef_, ob); } else if (coordinateReferenceNode.Attributes["href"] != null) { coordinateReferenceIDRef_ = coordinateReferenceNode.Attributes["href"].Value; } else { coordinateReference_ = new PricingDataPointCoordinateReference(coordinateReferenceNode); } } else { coordinateReference_ = new PricingDataPointCoordinateReference(coordinateReferenceNode); } } }
public Bond(XmlNode xmlNode) : base(xmlNode) { 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 parValueNodeList = xmlNode.SelectNodes("parValue"); if (parValueNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in parValueNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { parValueIDRef = item.Attributes["id"].Name; XsdTypeDecimal ob = XsdTypeDecimal(); IDManager.SetID(parValueIDRef, ob); } else if (item.Attributes.ToString() == "href") { parValueIDRef = item.Attributes["href"].Name; } else { parValue = new XsdTypeDecimal(item); } } } XmlNodeList faceAmountNodeList = xmlNode.SelectNodes("faceAmount"); if (faceAmountNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in faceAmountNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { faceAmountIDRef = item.Attributes["id"].Name; XsdTypeDecimal ob = XsdTypeDecimal(); IDManager.SetID(faceAmountIDRef, ob); } else if (item.Attributes.ToString() == "href") { faceAmountIDRef = item.Attributes["href"].Name; } else { faceAmount = new XsdTypeDecimal(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); } } } }
public PricingParameterDerivative(XmlNode xmlNode) { XmlNode descriptionNode = xmlNode.SelectSingleNode("description"); if (descriptionNode != null) { if (descriptionNode.Attributes["href"] != null || descriptionNode.Attributes["id"] != null) { if (descriptionNode.Attributes["id"] != null) { descriptionIDRef_ = descriptionNode.Attributes["id"].Value; XsdTypeString ob = new XsdTypeString(descriptionNode); IDManager.SetID(descriptionIDRef_, ob); } else if (descriptionNode.Attributes["href"] != null) { descriptionIDRef_ = descriptionNode.Attributes["href"].Value; } else { description_ = new XsdTypeString(descriptionNode); } } else { description_ = new XsdTypeString(descriptionNode); } } XmlNode parameterReferenceNode = xmlNode.SelectSingleNode("parameterReference"); if (parameterReferenceNode != null) { if (parameterReferenceNode.Attributes["href"] != null || parameterReferenceNode.Attributes["id"] != null) { if (parameterReferenceNode.Attributes["id"] != null) { parameterReferenceIDRef_ = parameterReferenceNode.Attributes["id"].Value; AssetOrTermPointOrPricingStructureReference ob = new AssetOrTermPointOrPricingStructureReference(parameterReferenceNode); IDManager.SetID(parameterReferenceIDRef_, ob); } else if (parameterReferenceNode.Attributes["href"] != null) { parameterReferenceIDRef_ = parameterReferenceNode.Attributes["href"].Value; } else { parameterReference_ = new AssetOrTermPointOrPricingStructureReference(parameterReferenceNode); } } else { parameterReference_ = new AssetOrTermPointOrPricingStructureReference(parameterReferenceNode); } } XmlNodeList inputDateReferenceNodeList = xmlNode.SelectNodes("inputDateReference"); if (inputDateReferenceNodeList != null) { this.inputDateReference_ = new List<ValuationReference>(); foreach (XmlNode item in inputDateReferenceNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] != null) { if (item.Attributes["id"] != null) { inputDateReferenceIDRef_ = item.Attributes["id"].Value; inputDateReference_.Add(new ValuationReference(item)); IDManager.SetID(inputDateReferenceIDRef_, inputDateReference_[inputDateReference_.Count - 1 ]); } else if (item.Attributes["href"] != null) { inputDateReferenceIDRef_ = item.Attributes["href"].Value; } else { inputDateReference_.Add(new ValuationReference(item)); } } else { inputDateReference_.Add(new ValuationReference(item)); } } } XmlNode calculationProcedureNode = xmlNode.SelectSingleNode("calculationProcedure"); if (calculationProcedureNode != null) { if (calculationProcedureNode.Attributes["href"] != null || calculationProcedureNode.Attributes["id"] != null) { if (calculationProcedureNode.Attributes["id"] != null) { calculationProcedureIDRef_ = calculationProcedureNode.Attributes["id"].Value; DerivativeCalculationProcedure ob = new DerivativeCalculationProcedure(calculationProcedureNode); IDManager.SetID(calculationProcedureIDRef_, ob); } else if (calculationProcedureNode.Attributes["href"] != null) { calculationProcedureIDRef_ = calculationProcedureNode.Attributes["href"].Value; } else { calculationProcedure_ = new DerivativeCalculationProcedure(calculationProcedureNode); } } else { calculationProcedure_ = new DerivativeCalculationProcedure(calculationProcedureNode); } } }
public DividendPayout(XmlNode xmlNode) { XmlNode dividendPayoutRatioNode = xmlNode.SelectSingleNode("dividendPayoutRatio"); if (dividendPayoutRatioNode != null) { if (dividendPayoutRatioNode.Attributes["href"] != null || dividendPayoutRatioNode.Attributes["id"] != null) { if (dividendPayoutRatioNode.Attributes["id"] != null) { dividendPayoutRatioIDRef_ = dividendPayoutRatioNode.Attributes["id"].Value; XsdTypeDecimal ob = new XsdTypeDecimal(dividendPayoutRatioNode); IDManager.SetID(dividendPayoutRatioIDRef_, ob); } else if (dividendPayoutRatioNode.Attributes["href"] != null) { dividendPayoutRatioIDRef_ = dividendPayoutRatioNode.Attributes["href"].Value; } else { dividendPayoutRatio_ = new XsdTypeDecimal(dividendPayoutRatioNode); } } else { dividendPayoutRatio_ = new XsdTypeDecimal(dividendPayoutRatioNode); } } XmlNode dividendPayoutConditionsNode = xmlNode.SelectSingleNode("dividendPayoutConditions"); if (dividendPayoutConditionsNode != null) { if (dividendPayoutConditionsNode.Attributes["href"] != null || dividendPayoutConditionsNode.Attributes["id"] != null) { if (dividendPayoutConditionsNode.Attributes["id"] != null) { dividendPayoutConditionsIDRef_ = dividendPayoutConditionsNode.Attributes["id"].Value; XsdTypeString ob = new XsdTypeString(dividendPayoutConditionsNode); IDManager.SetID(dividendPayoutConditionsIDRef_, ob); } else if (dividendPayoutConditionsNode.Attributes["href"] != null) { dividendPayoutConditionsIDRef_ = dividendPayoutConditionsNode.Attributes["href"].Value; } else { dividendPayoutConditions_ = new XsdTypeString(dividendPayoutConditionsNode); } } else { dividendPayoutConditions_ = new XsdTypeString(dividendPayoutConditionsNode); } } XmlNodeList dividendPaymentNodeList = xmlNode.SelectNodes("dividendPayment"); if (dividendPaymentNodeList != null) { this.dividendPayment_ = new List<PendingPayment>(); foreach (XmlNode item in dividendPaymentNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] != null) { if (item.Attributes["id"] != null) { dividendPaymentIDRef_ = item.Attributes["id"].Value; dividendPayment_.Add(new PendingPayment(item)); IDManager.SetID(dividendPaymentIDRef_, dividendPayment_[dividendPayment_.Count - 1 ]); } else if (item.Attributes["href"] != null) { dividendPaymentIDRef_ = item.Attributes["href"].Value; } else { dividendPayment_.Add(new PendingPayment(item)); } } else { dividendPayment_.Add(new PendingPayment(item)); } } } }
public RoutingIdsAndExplicitDetails(XmlNode xmlNode) { XmlNodeList routingIdsNodeList = xmlNode.SelectNodes("routingIds"); if (routingIdsNodeList != null) { this.routingIds_ = new List<RoutingIds>(); foreach (XmlNode item in routingIdsNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] != null) { if (item.Attributes["id"] != null) { routingIdsIDRef_ = item.Attributes["id"].Value; routingIds_.Add(new RoutingIds(item)); IDManager.SetID(routingIdsIDRef_, routingIds_[routingIds_.Count - 1 ]); } else if (item.Attributes["href"] != null) { routingIdsIDRef_ = item.Attributes["href"].Value; } else { routingIds_.Add(new RoutingIds(item)); } } else { routingIds_.Add(new RoutingIds(item)); } } } XmlNode routingNameNode = xmlNode.SelectSingleNode("routingName"); if (routingNameNode != null) { if (routingNameNode.Attributes["href"] != null || routingNameNode.Attributes["id"] != null) { if (routingNameNode.Attributes["id"] != null) { routingNameIDRef_ = routingNameNode.Attributes["id"].Value; XsdTypeString ob = new XsdTypeString(routingNameNode); IDManager.SetID(routingNameIDRef_, ob); } else if (routingNameNode.Attributes["href"] != null) { routingNameIDRef_ = routingNameNode.Attributes["href"].Value; } else { routingName_ = new XsdTypeString(routingNameNode); } } else { routingName_ = new XsdTypeString(routingNameNode); } } XmlNode routingAddressNode = xmlNode.SelectSingleNode("routingAddress"); if (routingAddressNode != null) { if (routingAddressNode.Attributes["href"] != null || routingAddressNode.Attributes["id"] != null) { if (routingAddressNode.Attributes["id"] != null) { routingAddressIDRef_ = routingAddressNode.Attributes["id"].Value; Address ob = new Address(routingAddressNode); IDManager.SetID(routingAddressIDRef_, ob); } else if (routingAddressNode.Attributes["href"] != null) { routingAddressIDRef_ = routingAddressNode.Attributes["href"].Value; } else { routingAddress_ = new Address(routingAddressNode); } } else { routingAddress_ = new Address(routingAddressNode); } } XmlNode routingAccountNumberNode = xmlNode.SelectSingleNode("routingAccountNumber"); if (routingAccountNumberNode != null) { if (routingAccountNumberNode.Attributes["href"] != null || routingAccountNumberNode.Attributes["id"] != null) { if (routingAccountNumberNode.Attributes["id"] != null) { routingAccountNumberIDRef_ = routingAccountNumberNode.Attributes["id"].Value; XsdTypeString ob = new XsdTypeString(routingAccountNumberNode); IDManager.SetID(routingAccountNumberIDRef_, ob); } else if (routingAccountNumberNode.Attributes["href"] != null) { routingAccountNumberIDRef_ = routingAccountNumberNode.Attributes["href"].Value; } else { routingAccountNumber_ = new XsdTypeString(routingAccountNumberNode); } } else { routingAccountNumber_ = new XsdTypeString(routingAccountNumberNode); } } XmlNodeList routingReferenceTextNodeList = xmlNode.SelectNodes("routingReferenceText"); if (routingReferenceTextNodeList != null) { this.routingReferenceText_ = new List<XsdTypeString>(); foreach (XmlNode item in routingReferenceTextNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] != null) { if (item.Attributes["id"] != null) { routingReferenceTextIDRef_ = item.Attributes["id"].Value; routingReferenceText_.Add(new XsdTypeString(item)); IDManager.SetID(routingReferenceTextIDRef_, routingReferenceText_[routingReferenceText_.Count - 1 ]); } else if (item.Attributes["href"] != null) { routingReferenceTextIDRef_ = item.Attributes["href"].Value; } else { routingReferenceText_.Add(new XsdTypeString(item)); } } else { routingReferenceText_.Add(new XsdTypeString(item)); } } } }
public DividendPayout(XmlNode xmlNode) { XmlNode dividendPayoutRatioNode = xmlNode.SelectSingleNode("dividendPayoutRatio"); if (dividendPayoutRatioNode != null) { if (dividendPayoutRatioNode.Attributes["href"] != null || dividendPayoutRatioNode.Attributes["id"] != null) { if (dividendPayoutRatioNode.Attributes["id"] != null) { dividendPayoutRatioIDRef_ = dividendPayoutRatioNode.Attributes["id"].Value; XsdTypeDecimal ob = new XsdTypeDecimal(dividendPayoutRatioNode); IDManager.SetID(dividendPayoutRatioIDRef_, ob); } else if (dividendPayoutRatioNode.Attributes["href"] != null) { dividendPayoutRatioIDRef_ = dividendPayoutRatioNode.Attributes["href"].Value; } else { dividendPayoutRatio_ = new XsdTypeDecimal(dividendPayoutRatioNode); } } else { dividendPayoutRatio_ = new XsdTypeDecimal(dividendPayoutRatioNode); } } XmlNode dividendPayoutConditionsNode = xmlNode.SelectSingleNode("dividendPayoutConditions"); if (dividendPayoutConditionsNode != null) { if (dividendPayoutConditionsNode.Attributes["href"] != null || dividendPayoutConditionsNode.Attributes["id"] != null) { if (dividendPayoutConditionsNode.Attributes["id"] != null) { dividendPayoutConditionsIDRef_ = dividendPayoutConditionsNode.Attributes["id"].Value; XsdTypeString ob = new XsdTypeString(dividendPayoutConditionsNode); IDManager.SetID(dividendPayoutConditionsIDRef_, ob); } else if (dividendPayoutConditionsNode.Attributes["href"] != null) { dividendPayoutConditionsIDRef_ = dividendPayoutConditionsNode.Attributes["href"].Value; } else { dividendPayoutConditions_ = new XsdTypeString(dividendPayoutConditionsNode); } } else { dividendPayoutConditions_ = new XsdTypeString(dividendPayoutConditionsNode); } } XmlNodeList dividendPaymentNodeList = xmlNode.SelectNodes("dividendPayment"); if (dividendPaymentNodeList != null) { this.dividendPayment_ = new List <PendingPayment>(); foreach (XmlNode item in dividendPaymentNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] != null) { if (item.Attributes["id"] != null) { dividendPaymentIDRef_ = item.Attributes["id"].Value; dividendPayment_.Add(new PendingPayment(item)); IDManager.SetID(dividendPaymentIDRef_, dividendPayment_[dividendPayment_.Count - 1]); } else if (item.Attributes["href"] != null) { dividendPaymentIDRef_ = item.Attributes["href"].Value; } else { dividendPayment_.Add(new PendingPayment(item)); } } else { dividendPayment_.Add(new PendingPayment(item)); } } } }