コード例 #1
0
        public CompressionActivity(XmlNode xmlNode)
        {
            XmlNodeList compressionTypeNodeList = xmlNode.SelectNodes("compressionType");

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

            foreach (XmlNode item in compressionTypeNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        compressionTypeIDRef = item.Attributes["id"].Name;
                        CompressionType ob = CompressionType();
                        IDManager.SetID(compressionTypeIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        compressionTypeIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        compressionType = new CompressionType(item);
                    }
                }
            }


            XmlNodeList replacementTradeIdentifierNodeList = xmlNode.SelectNodes("replacementTradeIdentifier");

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

            foreach (XmlNode item in replacementTradeIdentifierNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        replacementTradeIdentifierIDRef = item.Attributes["id"].Name;
                        TradeIdentifier ob = TradeIdentifier();
                        IDManager.SetID(replacementTradeIdentifierIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        replacementTradeIdentifierIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        replacementTradeIdentifier = new TradeIdentifier(item);
                    }
                }
            }


            XmlNodeList originatingTradeIdentifierNodeList = xmlNode.SelectNodes("originatingTradeIdentifier");

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


            XmlNodeList replacementTradeIdNodeList = xmlNode.SelectNodes("replacementTradeId");

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

            foreach (XmlNode item in replacementTradeIdNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        replacementTradeIdIDRef = item.Attributes["id"].Name;
                        TradeId ob = TradeId();
                        IDManager.SetID(replacementTradeIdIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        replacementTradeIdIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        replacementTradeId = new TradeId(item);
                    }
                }
            }


            XmlNodeList originatingTradeIdNodeList = xmlNode.SelectNodes("originatingTradeId");

            foreach (XmlNode item in originatingTradeIdNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        originatingTradeIdIDRef = item.Attributes["id"].Name;
                        List <TradeId> ob = new List <TradeId>();
                        ob.Add(new TradeId(item));
                        IDManager.SetID(originatingTradeIdIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        originatingTradeIdIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        originatingTradeId.Add(new TradeId(item));
                    }
                }
            }
        }
コード例 #2
0
 public TradeIdentifier(XmlNode xmlNode)
 {
     XmlNode issuerNode = xmlNode.SelectSingleNode("issuer");
     
     if (issuerNode != null)
     {
         if (issuerNode.Attributes["href"] != null || issuerNode.Attributes["id"] != null) 
         {
             if (issuerNode.Attributes["id"] != null) 
             {
                 issuerIDRef_ = issuerNode.Attributes["id"].Value;
                 IssuerId ob = new IssuerId(issuerNode);
                 IDManager.SetID(issuerIDRef_, ob);
             }
             else if (issuerNode.Attributes["href"] != null)
             {
                 issuerIDRef_ = issuerNode.Attributes["href"].Value;
             }
             else
             {
                 issuer_ = new IssuerId(issuerNode);
             }
         }
         else
         {
             issuer_ = new IssuerId(issuerNode);
         }
     }
     
 
     XmlNode tradeIdNode = xmlNode.SelectSingleNode("tradeId");
     
     if (tradeIdNode != null)
     {
         if (tradeIdNode.Attributes["href"] != null || tradeIdNode.Attributes["id"] != null) 
         {
             if (tradeIdNode.Attributes["id"] != null) 
             {
                 tradeIdIDRef_ = tradeIdNode.Attributes["id"].Value;
                 TradeId ob = new TradeId(tradeIdNode);
                 IDManager.SetID(tradeIdIDRef_, ob);
             }
             else if (tradeIdNode.Attributes["href"] != null)
             {
                 tradeIdIDRef_ = tradeIdNode.Attributes["href"].Value;
             }
             else
             {
                 tradeId_ = new TradeId(tradeIdNode);
             }
         }
         else
         {
             tradeId_ = new TradeId(tradeIdNode);
         }
     }
     
 
     XmlNode partyReferenceNode = xmlNode.SelectSingleNode("partyReference");
     
     if (partyReferenceNode != null)
     {
         if (partyReferenceNode.Attributes["href"] != null || partyReferenceNode.Attributes["id"] != null) 
         {
             if (partyReferenceNode.Attributes["id"] != null) 
             {
                 partyReferenceIDRef_ = partyReferenceNode.Attributes["id"].Value;
                 PartyReference ob = new PartyReference(partyReferenceNode);
                 IDManager.SetID(partyReferenceIDRef_, ob);
             }
             else if (partyReferenceNode.Attributes["href"] != null)
             {
                 partyReferenceIDRef_ = partyReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 partyReference_ = new PartyReference(partyReferenceNode);
             }
         }
         else
         {
             partyReference_ = new PartyReference(partyReferenceNode);
         }
     }
     
 
     XmlNode accountReferenceNode = xmlNode.SelectSingleNode("accountReference");
     
     if (accountReferenceNode != null)
     {
         if (accountReferenceNode.Attributes["href"] != null || accountReferenceNode.Attributes["id"] != null) 
         {
             if (accountReferenceNode.Attributes["id"] != null) 
             {
                 accountReferenceIDRef_ = accountReferenceNode.Attributes["id"].Value;
                 AccountReference ob = new AccountReference(accountReferenceNode);
                 IDManager.SetID(accountReferenceIDRef_, ob);
             }
             else if (accountReferenceNode.Attributes["href"] != null)
             {
                 accountReferenceIDRef_ = accountReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 accountReference_ = new AccountReference(accountReferenceNode);
             }
         }
         else
         {
             accountReference_ = new AccountReference(accountReferenceNode);
         }
     }
     
 
     XmlNode versionedTradeIdNode = xmlNode.SelectSingleNode("versionedTradeId");
     
     if (versionedTradeIdNode != null)
     {
         if (versionedTradeIdNode.Attributes["href"] != null || versionedTradeIdNode.Attributes["id"] != null) 
         {
             if (versionedTradeIdNode.Attributes["id"] != null) 
             {
                 versionedTradeIdIDRef_ = versionedTradeIdNode.Attributes["id"].Value;
                 VersionedTradeId ob = new VersionedTradeId(versionedTradeIdNode);
                 IDManager.SetID(versionedTradeIdIDRef_, ob);
             }
             else if (versionedTradeIdNode.Attributes["href"] != null)
             {
                 versionedTradeIdIDRef_ = versionedTradeIdNode.Attributes["href"].Value;
             }
             else
             {
                 versionedTradeId_ = new VersionedTradeId(versionedTradeIdNode);
             }
         }
         else
         {
             versionedTradeId_ = new VersionedTradeId(versionedTradeIdNode);
         }
     }
     
 
 }
コード例 #3
0
        public TradeIdentifier(XmlNode xmlNode)
        {
            XmlNode issuerNode = xmlNode.SelectSingleNode("issuer");

            if (issuerNode != null)
            {
                if (issuerNode.Attributes["href"] != null || issuerNode.Attributes["id"] != null)
                {
                    if (issuerNode.Attributes["id"] != null)
                    {
                        issuerIDRef_ = issuerNode.Attributes["id"].Value;
                        IssuerId ob = new IssuerId(issuerNode);
                        IDManager.SetID(issuerIDRef_, ob);
                    }
                    else if (issuerNode.Attributes["href"] != null)
                    {
                        issuerIDRef_ = issuerNode.Attributes["href"].Value;
                    }
                    else
                    {
                        issuer_ = new IssuerId(issuerNode);
                    }
                }
                else
                {
                    issuer_ = new IssuerId(issuerNode);
                }
            }


            XmlNode tradeIdNode = xmlNode.SelectSingleNode("tradeId");

            if (tradeIdNode != null)
            {
                if (tradeIdNode.Attributes["href"] != null || tradeIdNode.Attributes["id"] != null)
                {
                    if (tradeIdNode.Attributes["id"] != null)
                    {
                        tradeIdIDRef_ = tradeIdNode.Attributes["id"].Value;
                        TradeId ob = new TradeId(tradeIdNode);
                        IDManager.SetID(tradeIdIDRef_, ob);
                    }
                    else if (tradeIdNode.Attributes["href"] != null)
                    {
                        tradeIdIDRef_ = tradeIdNode.Attributes["href"].Value;
                    }
                    else
                    {
                        tradeId_ = new TradeId(tradeIdNode);
                    }
                }
                else
                {
                    tradeId_ = new TradeId(tradeIdNode);
                }
            }


            XmlNode partyReferenceNode = xmlNode.SelectSingleNode("partyReference");

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


            XmlNode accountReferenceNode = xmlNode.SelectSingleNode("accountReference");

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


            XmlNode versionedTradeIdNode = xmlNode.SelectSingleNode("versionedTradeId");

            if (versionedTradeIdNode != null)
            {
                if (versionedTradeIdNode.Attributes["href"] != null || versionedTradeIdNode.Attributes["id"] != null)
                {
                    if (versionedTradeIdNode.Attributes["id"] != null)
                    {
                        versionedTradeIdIDRef_ = versionedTradeIdNode.Attributes["id"].Value;
                        VersionedTradeId ob = new VersionedTradeId(versionedTradeIdNode);
                        IDManager.SetID(versionedTradeIdIDRef_, ob);
                    }
                    else if (versionedTradeIdNode.Attributes["href"] != null)
                    {
                        versionedTradeIdIDRef_ = versionedTradeIdNode.Attributes["href"].Value;
                    }
                    else
                    {
                        versionedTradeId_ = new VersionedTradeId(versionedTradeIdNode);
                    }
                }
                else
                {
                    versionedTradeId_ = new VersionedTradeId(versionedTradeIdNode);
                }
            }
        }
コード例 #4
0
        public VersionedTradeId(XmlNode xmlNode)
        {
            XmlNodeList tradeIdNodeList = xmlNode.SelectNodes("tradeId");

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

            foreach (XmlNode item in tradeIdNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        tradeIdIDRef = item.Attributes["id"].Name;
                        TradeId ob = TradeId();
                        IDManager.SetID(tradeIdIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        tradeIdIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        tradeId = new TradeId(item);
                    }
                }
            }


            XmlNodeList versionNodeList = xmlNode.SelectNodes("version");

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

            foreach (XmlNode item in versionNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        versionIDRef = item.Attributes["id"].Name;
                        XsdTypeNonNegativeInteger ob = XsdTypeNonNegativeInteger();
                        IDManager.SetID(versionIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        versionIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        version = new XsdTypeNonNegativeInteger(item);
                    }
                }
            }


            XmlNodeList effectiveDateNodeList = xmlNode.SelectNodes("effectiveDate");

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

            foreach (XmlNode item in effectiveDateNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        effectiveDateIDRef = item.Attributes["id"].Name;
                        IdentifiedDate ob = IdentifiedDate();
                        IDManager.SetID(effectiveDateIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        effectiveDateIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        effectiveDate = new IdentifiedDate(item);
                    }
                }
            }
        }
        public ProductComponentIdentifier(XmlNode xmlNode)
        {
            XmlNode premiumProductReferenceNode = xmlNode.SelectSingleNode("premiumProductReference");

            if (premiumProductReferenceNode != null)
            {
                if (premiumProductReferenceNode.Attributes["href"] != null || premiumProductReferenceNode.Attributes["id"] != null)
                {
                    if (premiumProductReferenceNode.Attributes["id"] != null)
                    {
                        premiumProductReferenceIDRef_ = premiumProductReferenceNode.Attributes["id"].Value;
                        ProductReference ob = new ProductReference(premiumProductReferenceNode);
                        IDManager.SetID(premiumProductReferenceIDRef_, ob);
                    }
                    else if (premiumProductReferenceNode.Attributes["href"] != null)
                    {
                        premiumProductReferenceIDRef_ = premiumProductReferenceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        premiumProductReference_ = new ProductReference(premiumProductReferenceNode);
                    }
                }
                else
                {
                    premiumProductReference_ = new ProductReference(premiumProductReferenceNode);
                }
            }


            XmlNode issuerNode = xmlNode.SelectSingleNode("issuer");

            if (issuerNode != null)
            {
                if (issuerNode.Attributes["href"] != null || issuerNode.Attributes["id"] != null)
                {
                    if (issuerNode.Attributes["id"] != null)
                    {
                        issuerIDRef_ = issuerNode.Attributes["id"].Value;
                        IssuerId ob = new IssuerId(issuerNode);
                        IDManager.SetID(issuerIDRef_, ob);
                    }
                    else if (issuerNode.Attributes["href"] != null)
                    {
                        issuerIDRef_ = issuerNode.Attributes["href"].Value;
                    }
                    else
                    {
                        issuer_ = new IssuerId(issuerNode);
                    }
                }
                else
                {
                    issuer_ = new IssuerId(issuerNode);
                }
            }


            XmlNode tradeIdNode = xmlNode.SelectSingleNode("tradeId");

            if (tradeIdNode != null)
            {
                if (tradeIdNode.Attributes["href"] != null || tradeIdNode.Attributes["id"] != null)
                {
                    if (tradeIdNode.Attributes["id"] != null)
                    {
                        tradeIdIDRef_ = tradeIdNode.Attributes["id"].Value;
                        TradeId ob = new TradeId(tradeIdNode);
                        IDManager.SetID(tradeIdIDRef_, ob);
                    }
                    else if (tradeIdNode.Attributes["href"] != null)
                    {
                        tradeIdIDRef_ = tradeIdNode.Attributes["href"].Value;
                    }
                    else
                    {
                        tradeId_ = new TradeId(tradeIdNode);
                    }
                }
                else
                {
                    tradeId_ = new TradeId(tradeIdNode);
                }
            }
        }
コード例 #6
0
        public VersionedTradeId(XmlNode xmlNode)
        {
            XmlNode tradeIdNode = xmlNode.SelectSingleNode("tradeId");

            if (tradeIdNode != null)
            {
                if (tradeIdNode.Attributes["href"] != null || tradeIdNode.Attributes["id"] != null)
                {
                    if (tradeIdNode.Attributes["id"] != null)
                    {
                        tradeIdIDRef_ = tradeIdNode.Attributes["id"].Value;
                        TradeId ob = new TradeId(tradeIdNode);
                        IDManager.SetID(tradeIdIDRef_, ob);
                    }
                    else if (tradeIdNode.Attributes["href"] != null)
                    {
                        tradeIdIDRef_ = tradeIdNode.Attributes["href"].Value;
                    }
                    else
                    {
                        tradeId_ = new TradeId(tradeIdNode);
                    }
                }
                else
                {
                    tradeId_ = new TradeId(tradeIdNode);
                }
            }


            XmlNode versionNode = xmlNode.SelectSingleNode("version");

            if (versionNode != null)
            {
                if (versionNode.Attributes["href"] != null || versionNode.Attributes["id"] != null)
                {
                    if (versionNode.Attributes["id"] != null)
                    {
                        versionIDRef_ = versionNode.Attributes["id"].Value;
                        XsdTypeNonNegativeInteger ob = new XsdTypeNonNegativeInteger(versionNode);
                        IDManager.SetID(versionIDRef_, ob);
                    }
                    else if (versionNode.Attributes["href"] != null)
                    {
                        versionIDRef_ = versionNode.Attributes["href"].Value;
                    }
                    else
                    {
                        version_ = new XsdTypeNonNegativeInteger(versionNode);
                    }
                }
                else
                {
                    version_ = new XsdTypeNonNegativeInteger(versionNode);
                }
            }


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

            if (effectiveDateNode != null)
            {
                if (effectiveDateNode.Attributes["href"] != null || effectiveDateNode.Attributes["id"] != null)
                {
                    if (effectiveDateNode.Attributes["id"] != null)
                    {
                        effectiveDateIDRef_ = effectiveDateNode.Attributes["id"].Value;
                        IdentifiedDate ob = new IdentifiedDate(effectiveDateNode);
                        IDManager.SetID(effectiveDateIDRef_, ob);
                    }
                    else if (effectiveDateNode.Attributes["href"] != null)
                    {
                        effectiveDateIDRef_ = effectiveDateNode.Attributes["href"].Value;
                    }
                    else
                    {
                        effectiveDate_ = new IdentifiedDate(effectiveDateNode);
                    }
                }
                else
                {
                    effectiveDate_ = new IdentifiedDate(effectiveDateNode);
                }
            }
        }
        public ProductComponentIdentifier(XmlNode xmlNode)
        {
            XmlNodeList premiumProductReferenceNodeList = xmlNode.SelectNodes("premiumProductReference");

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

            foreach (XmlNode item in premiumProductReferenceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        premiumProductReferenceIDRef = item.Attributes["id"].Name;
                        ProductReference ob = ProductReference();
                        IDManager.SetID(premiumProductReferenceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        premiumProductReferenceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        premiumProductReference = new ProductReference(item);
                    }
                }
            }


            XmlNodeList issuerNodeList = xmlNode.SelectNodes("issuer");

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

            foreach (XmlNode item in issuerNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        issuerIDRef = item.Attributes["id"].Name;
                        IssuerId ob = IssuerId();
                        IDManager.SetID(issuerIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        issuerIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        issuer = new IssuerId(item);
                    }
                }
            }


            XmlNodeList tradeIdNodeList = xmlNode.SelectNodes("tradeId");

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

            foreach (XmlNode item in tradeIdNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        tradeIdIDRef = item.Attributes["id"].Name;
                        TradeId ob = TradeId();
                        IDManager.SetID(tradeIdIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        tradeIdIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        tradeId = new TradeId(item);
                    }
                }
            }
        }
コード例 #8
0
 public VersionedTradeId(XmlNode xmlNode)
 {
     XmlNodeList tradeIdNodeList = xmlNode.SelectNodes("tradeId");
     if (tradeIdNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in tradeIdNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 tradeIdIDRef = item.Attributes["id"].Name;
                 TradeId ob = TradeId();
                 IDManager.SetID(tradeIdIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 tradeIdIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 tradeId = new TradeId(item);
             }
         }
     }
     
 
     XmlNodeList versionNodeList = xmlNode.SelectNodes("version");
     if (versionNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in versionNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 versionIDRef = item.Attributes["id"].Name;
                 XsdTypeNonNegativeInteger ob = XsdTypeNonNegativeInteger();
                 IDManager.SetID(versionIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 versionIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 version = new XsdTypeNonNegativeInteger(item);
             }
         }
     }
     
 
     XmlNodeList effectiveDateNodeList = xmlNode.SelectNodes("effectiveDate");
     if (effectiveDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in effectiveDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 effectiveDateIDRef = item.Attributes["id"].Name;
                 IdentifiedDate ob = IdentifiedDate();
                 IDManager.SetID(effectiveDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 effectiveDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 effectiveDate = new IdentifiedDate(item);
             }
         }
     }
     
 
 }
コード例 #9
0
 public VersionedTradeId(XmlNode xmlNode)
 {
     XmlNode tradeIdNode = xmlNode.SelectSingleNode("tradeId");
     
     if (tradeIdNode != null)
     {
         if (tradeIdNode.Attributes["href"] != null || tradeIdNode.Attributes["id"] != null) 
         {
             if (tradeIdNode.Attributes["id"] != null) 
             {
                 tradeIdIDRef_ = tradeIdNode.Attributes["id"].Value;
                 TradeId ob = new TradeId(tradeIdNode);
                 IDManager.SetID(tradeIdIDRef_, ob);
             }
             else if (tradeIdNode.Attributes["href"] != null)
             {
                 tradeIdIDRef_ = tradeIdNode.Attributes["href"].Value;
             }
             else
             {
                 tradeId_ = new TradeId(tradeIdNode);
             }
         }
         else
         {
             tradeId_ = new TradeId(tradeIdNode);
         }
     }
     
 
     XmlNode versionNode = xmlNode.SelectSingleNode("version");
     
     if (versionNode != null)
     {
         if (versionNode.Attributes["href"] != null || versionNode.Attributes["id"] != null) 
         {
             if (versionNode.Attributes["id"] != null) 
             {
                 versionIDRef_ = versionNode.Attributes["id"].Value;
                 XsdTypeNonNegativeInteger ob = new XsdTypeNonNegativeInteger(versionNode);
                 IDManager.SetID(versionIDRef_, ob);
             }
             else if (versionNode.Attributes["href"] != null)
             {
                 versionIDRef_ = versionNode.Attributes["href"].Value;
             }
             else
             {
                 version_ = new XsdTypeNonNegativeInteger(versionNode);
             }
         }
         else
         {
             version_ = new XsdTypeNonNegativeInteger(versionNode);
         }
     }
     
 
     XmlNode effectiveDateNode = xmlNode.SelectSingleNode("effectiveDate");
     
     if (effectiveDateNode != null)
     {
         if (effectiveDateNode.Attributes["href"] != null || effectiveDateNode.Attributes["id"] != null) 
         {
             if (effectiveDateNode.Attributes["id"] != null) 
             {
                 effectiveDateIDRef_ = effectiveDateNode.Attributes["id"].Value;
                 IdentifiedDate ob = new IdentifiedDate(effectiveDateNode);
                 IDManager.SetID(effectiveDateIDRef_, ob);
             }
             else if (effectiveDateNode.Attributes["href"] != null)
             {
                 effectiveDateIDRef_ = effectiveDateNode.Attributes["href"].Value;
             }
             else
             {
                 effectiveDate_ = new IdentifiedDate(effectiveDateNode);
             }
         }
         else
         {
             effectiveDate_ = new IdentifiedDate(effectiveDateNode);
         }
     }
     
 
 }
コード例 #10
0
 public CompressionActivity(XmlNode xmlNode)
 {
     XmlNodeList compressionTypeNodeList = xmlNode.SelectNodes("compressionType");
     if (compressionTypeNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in compressionTypeNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 compressionTypeIDRef = item.Attributes["id"].Name;
                 CompressionType ob = CompressionType();
                 IDManager.SetID(compressionTypeIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 compressionTypeIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 compressionType = new CompressionType(item);
             }
         }
     }
     
 
     XmlNodeList replacementTradeIdentifierNodeList = xmlNode.SelectNodes("replacementTradeIdentifier");
     if (replacementTradeIdentifierNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in replacementTradeIdentifierNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 replacementTradeIdentifierIDRef = item.Attributes["id"].Name;
                 TradeIdentifier ob = TradeIdentifier();
                 IDManager.SetID(replacementTradeIdentifierIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 replacementTradeIdentifierIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 replacementTradeIdentifier = new TradeIdentifier(item);
             }
         }
     }
     
 
     XmlNodeList originatingTradeIdentifierNodeList = xmlNode.SelectNodes("originatingTradeIdentifier");
     
     foreach (XmlNode item in originatingTradeIdentifierNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 originatingTradeIdentifierIDRef = item.Attributes["id"].Name;
                 List<TradeIdentifier> ob = new List<TradeIdentifier>();
                 ob.Add(new TradeIdentifier(item));
                 IDManager.SetID(originatingTradeIdentifierIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 originatingTradeIdentifierIDRef = item.Attributes["href"].Name;
             }
             else
             {
             originatingTradeIdentifier.Add(new TradeIdentifier(item));
             }
         }
     }
     
 
     XmlNodeList replacementTradeIdNodeList = xmlNode.SelectNodes("replacementTradeId");
     if (replacementTradeIdNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in replacementTradeIdNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 replacementTradeIdIDRef = item.Attributes["id"].Name;
                 TradeId ob = TradeId();
                 IDManager.SetID(replacementTradeIdIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 replacementTradeIdIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 replacementTradeId = new TradeId(item);
             }
         }
     }
     
 
     XmlNodeList originatingTradeIdNodeList = xmlNode.SelectNodes("originatingTradeId");
     
     foreach (XmlNode item in originatingTradeIdNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 originatingTradeIdIDRef = item.Attributes["id"].Name;
                 List<TradeId> ob = new List<TradeId>();
                 ob.Add(new TradeId(item));
                 IDManager.SetID(originatingTradeIdIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 originatingTradeIdIDRef = item.Attributes["href"].Name;
             }
             else
             {
             originatingTradeId.Add(new TradeId(item));
             }
         }
     }
     
 
 }
 public ProductComponentIdentifier(XmlNode xmlNode)
 {
     XmlNode premiumProductReferenceNode = xmlNode.SelectSingleNode("premiumProductReference");
     
     if (premiumProductReferenceNode != null)
     {
         if (premiumProductReferenceNode.Attributes["href"] != null || premiumProductReferenceNode.Attributes["id"] != null) 
         {
             if (premiumProductReferenceNode.Attributes["id"] != null) 
             {
                 premiumProductReferenceIDRef_ = premiumProductReferenceNode.Attributes["id"].Value;
                 ProductReference ob = new ProductReference(premiumProductReferenceNode);
                 IDManager.SetID(premiumProductReferenceIDRef_, ob);
             }
             else if (premiumProductReferenceNode.Attributes["href"] != null)
             {
                 premiumProductReferenceIDRef_ = premiumProductReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 premiumProductReference_ = new ProductReference(premiumProductReferenceNode);
             }
         }
         else
         {
             premiumProductReference_ = new ProductReference(premiumProductReferenceNode);
         }
     }
     
 
     XmlNode issuerNode = xmlNode.SelectSingleNode("issuer");
     
     if (issuerNode != null)
     {
         if (issuerNode.Attributes["href"] != null || issuerNode.Attributes["id"] != null) 
         {
             if (issuerNode.Attributes["id"] != null) 
             {
                 issuerIDRef_ = issuerNode.Attributes["id"].Value;
                 IssuerId ob = new IssuerId(issuerNode);
                 IDManager.SetID(issuerIDRef_, ob);
             }
             else if (issuerNode.Attributes["href"] != null)
             {
                 issuerIDRef_ = issuerNode.Attributes["href"].Value;
             }
             else
             {
                 issuer_ = new IssuerId(issuerNode);
             }
         }
         else
         {
             issuer_ = new IssuerId(issuerNode);
         }
     }
     
 
     XmlNode tradeIdNode = xmlNode.SelectSingleNode("tradeId");
     
     if (tradeIdNode != null)
     {
         if (tradeIdNode.Attributes["href"] != null || tradeIdNode.Attributes["id"] != null) 
         {
             if (tradeIdNode.Attributes["id"] != null) 
             {
                 tradeIdIDRef_ = tradeIdNode.Attributes["id"].Value;
                 TradeId ob = new TradeId(tradeIdNode);
                 IDManager.SetID(tradeIdIDRef_, ob);
             }
             else if (tradeIdNode.Attributes["href"] != null)
             {
                 tradeIdIDRef_ = tradeIdNode.Attributes["href"].Value;
             }
             else
             {
                 tradeId_ = new TradeId(tradeIdNode);
             }
         }
         else
         {
             tradeId_ = new TradeId(tradeIdNode);
         }
     }
     
 
 }
 public ProductComponentIdentifier(XmlNode xmlNode)
 {
     XmlNodeList premiumProductReferenceNodeList = xmlNode.SelectNodes("premiumProductReference");
     if (premiumProductReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in premiumProductReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 premiumProductReferenceIDRef = item.Attributes["id"].Name;
                 ProductReference ob = ProductReference();
                 IDManager.SetID(premiumProductReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 premiumProductReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 premiumProductReference = new ProductReference(item);
             }
         }
     }
     
 
     XmlNodeList issuerNodeList = xmlNode.SelectNodes("issuer");
     if (issuerNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in issuerNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 issuerIDRef = item.Attributes["id"].Name;
                 IssuerId ob = IssuerId();
                 IDManager.SetID(issuerIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 issuerIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 issuer = new IssuerId(item);
             }
         }
     }
     
 
     XmlNodeList tradeIdNodeList = xmlNode.SelectNodes("tradeId");
     if (tradeIdNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in tradeIdNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 tradeIdIDRef = item.Attributes["id"].Name;
                 TradeId ob = TradeId();
                 IDManager.SetID(tradeIdIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 tradeIdIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 tradeId = new TradeId(item);
             }
         }
     }
     
 
 }
コード例 #13
0
 public CompressionActivity(XmlNode xmlNode)
 {
     XmlNode compressionTypeNode = xmlNode.SelectSingleNode("compressionType");
     
     if (compressionTypeNode != null)
     {
         if (compressionTypeNode.Attributes["href"] != null || compressionTypeNode.Attributes["id"] != null) 
         {
             if (compressionTypeNode.Attributes["id"] != null) 
             {
                 compressionTypeIDRef_ = compressionTypeNode.Attributes["id"].Value;
                 CompressionType ob = new CompressionType(compressionTypeNode);
                 IDManager.SetID(compressionTypeIDRef_, ob);
             }
             else if (compressionTypeNode.Attributes["href"] != null)
             {
                 compressionTypeIDRef_ = compressionTypeNode.Attributes["href"].Value;
             }
             else
             {
                 compressionType_ = new CompressionType(compressionTypeNode);
             }
         }
         else
         {
             compressionType_ = new CompressionType(compressionTypeNode);
         }
     }
     
 
     XmlNode replacementTradeIdentifierNode = xmlNode.SelectSingleNode("replacementTradeIdentifier");
     
     if (replacementTradeIdentifierNode != null)
     {
         if (replacementTradeIdentifierNode.Attributes["href"] != null || replacementTradeIdentifierNode.Attributes["id"] != null) 
         {
             if (replacementTradeIdentifierNode.Attributes["id"] != null) 
             {
                 replacementTradeIdentifierIDRef_ = replacementTradeIdentifierNode.Attributes["id"].Value;
                 TradeIdentifier ob = new TradeIdentifier(replacementTradeIdentifierNode);
                 IDManager.SetID(replacementTradeIdentifierIDRef_, ob);
             }
             else if (replacementTradeIdentifierNode.Attributes["href"] != null)
             {
                 replacementTradeIdentifierIDRef_ = replacementTradeIdentifierNode.Attributes["href"].Value;
             }
             else
             {
                 replacementTradeIdentifier_ = new TradeIdentifier(replacementTradeIdentifierNode);
             }
         }
         else
         {
             replacementTradeIdentifier_ = new TradeIdentifier(replacementTradeIdentifierNode);
         }
     }
     
 
     XmlNodeList originatingTradeIdentifierNodeList = xmlNode.SelectNodes("originatingTradeIdentifier");
     
     if (originatingTradeIdentifierNodeList != null)
     {
         this.originatingTradeIdentifier_ = new List<TradeIdentifier>();
         foreach (XmlNode item in originatingTradeIdentifierNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     originatingTradeIdentifierIDRef_ = item.Attributes["id"].Value;
                     originatingTradeIdentifier_.Add(new TradeIdentifier(item));
                     IDManager.SetID(originatingTradeIdentifierIDRef_, originatingTradeIdentifier_[originatingTradeIdentifier_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     originatingTradeIdentifierIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 originatingTradeIdentifier_.Add(new TradeIdentifier(item));
                 }
             }
             else
             {
                 originatingTradeIdentifier_.Add(new TradeIdentifier(item));
             }
         }
     }
     
 
     XmlNode replacementTradeIdNode = xmlNode.SelectSingleNode("replacementTradeId");
     
     if (replacementTradeIdNode != null)
     {
         if (replacementTradeIdNode.Attributes["href"] != null || replacementTradeIdNode.Attributes["id"] != null) 
         {
             if (replacementTradeIdNode.Attributes["id"] != null) 
             {
                 replacementTradeIdIDRef_ = replacementTradeIdNode.Attributes["id"].Value;
                 TradeId ob = new TradeId(replacementTradeIdNode);
                 IDManager.SetID(replacementTradeIdIDRef_, ob);
             }
             else if (replacementTradeIdNode.Attributes["href"] != null)
             {
                 replacementTradeIdIDRef_ = replacementTradeIdNode.Attributes["href"].Value;
             }
             else
             {
                 replacementTradeId_ = new TradeId(replacementTradeIdNode);
             }
         }
         else
         {
             replacementTradeId_ = new TradeId(replacementTradeIdNode);
         }
     }
     
 
     XmlNodeList originatingTradeIdNodeList = xmlNode.SelectNodes("originatingTradeId");
     
     if (originatingTradeIdNodeList != null)
     {
         this.originatingTradeId_ = new List<TradeId>();
         foreach (XmlNode item in originatingTradeIdNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     originatingTradeIdIDRef_ = item.Attributes["id"].Value;
                     originatingTradeId_.Add(new TradeId(item));
                     IDManager.SetID(originatingTradeIdIDRef_, originatingTradeId_[originatingTradeId_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     originatingTradeIdIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 originatingTradeId_.Add(new TradeId(item));
                 }
             }
             else
             {
                 originatingTradeId_.Add(new TradeId(item));
             }
         }
     }
     
 
 }
コード例 #14
0
 public TradeIdentifier(XmlNode xmlNode)
 {
     XmlNodeList issuerNodeList = xmlNode.SelectNodes("issuer");
     if (issuerNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in issuerNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 issuerIDRef = item.Attributes["id"].Name;
                 IssuerId ob = IssuerId();
                 IDManager.SetID(issuerIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 issuerIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 issuer = new IssuerId(item);
             }
         }
     }
     
 
     XmlNodeList tradeIdNodeList = xmlNode.SelectNodes("tradeId");
     if (tradeIdNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in tradeIdNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 tradeIdIDRef = item.Attributes["id"].Name;
                 TradeId ob = TradeId();
                 IDManager.SetID(tradeIdIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 tradeIdIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 tradeId = new TradeId(item);
             }
         }
     }
     
 
     XmlNodeList partyReferenceNodeList = xmlNode.SelectNodes("partyReference");
     if (partyReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in partyReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 partyReferenceIDRef = item.Attributes["id"].Name;
                 PartyReference ob = PartyReference();
                 IDManager.SetID(partyReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 partyReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 partyReference = new PartyReference(item);
             }
         }
     }
     
 
     XmlNodeList accountReferenceNodeList = xmlNode.SelectNodes("accountReference");
     if (accountReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in accountReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 accountReferenceIDRef = item.Attributes["id"].Name;
                 AccountReference ob = AccountReference();
                 IDManager.SetID(accountReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 accountReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 accountReference = new AccountReference(item);
             }
         }
     }
     
 
     XmlNodeList versionedTradeIdNodeList = xmlNode.SelectNodes("versionedTradeId");
     if (versionedTradeIdNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in versionedTradeIdNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 versionedTradeIdIDRef = item.Attributes["id"].Name;
                 VersionedTradeId ob = VersionedTradeId();
                 IDManager.SetID(versionedTradeIdIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 versionedTradeIdIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 versionedTradeId = new VersionedTradeId(item);
             }
         }
     }
     
 
 }
コード例 #15
0
        public CompressionActivity(XmlNode xmlNode)
        {
            XmlNode compressionTypeNode = xmlNode.SelectSingleNode("compressionType");

            if (compressionTypeNode != null)
            {
                if (compressionTypeNode.Attributes["href"] != null || compressionTypeNode.Attributes["id"] != null)
                {
                    if (compressionTypeNode.Attributes["id"] != null)
                    {
                        compressionTypeIDRef_ = compressionTypeNode.Attributes["id"].Value;
                        CompressionType ob = new CompressionType(compressionTypeNode);
                        IDManager.SetID(compressionTypeIDRef_, ob);
                    }
                    else if (compressionTypeNode.Attributes["href"] != null)
                    {
                        compressionTypeIDRef_ = compressionTypeNode.Attributes["href"].Value;
                    }
                    else
                    {
                        compressionType_ = new CompressionType(compressionTypeNode);
                    }
                }
                else
                {
                    compressionType_ = new CompressionType(compressionTypeNode);
                }
            }


            XmlNode replacementTradeIdentifierNode = xmlNode.SelectSingleNode("replacementTradeIdentifier");

            if (replacementTradeIdentifierNode != null)
            {
                if (replacementTradeIdentifierNode.Attributes["href"] != null || replacementTradeIdentifierNode.Attributes["id"] != null)
                {
                    if (replacementTradeIdentifierNode.Attributes["id"] != null)
                    {
                        replacementTradeIdentifierIDRef_ = replacementTradeIdentifierNode.Attributes["id"].Value;
                        TradeIdentifier ob = new TradeIdentifier(replacementTradeIdentifierNode);
                        IDManager.SetID(replacementTradeIdentifierIDRef_, ob);
                    }
                    else if (replacementTradeIdentifierNode.Attributes["href"] != null)
                    {
                        replacementTradeIdentifierIDRef_ = replacementTradeIdentifierNode.Attributes["href"].Value;
                    }
                    else
                    {
                        replacementTradeIdentifier_ = new TradeIdentifier(replacementTradeIdentifierNode);
                    }
                }
                else
                {
                    replacementTradeIdentifier_ = new TradeIdentifier(replacementTradeIdentifierNode);
                }
            }


            XmlNodeList originatingTradeIdentifierNodeList = xmlNode.SelectNodes("originatingTradeIdentifier");

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


            XmlNode replacementTradeIdNode = xmlNode.SelectSingleNode("replacementTradeId");

            if (replacementTradeIdNode != null)
            {
                if (replacementTradeIdNode.Attributes["href"] != null || replacementTradeIdNode.Attributes["id"] != null)
                {
                    if (replacementTradeIdNode.Attributes["id"] != null)
                    {
                        replacementTradeIdIDRef_ = replacementTradeIdNode.Attributes["id"].Value;
                        TradeId ob = new TradeId(replacementTradeIdNode);
                        IDManager.SetID(replacementTradeIdIDRef_, ob);
                    }
                    else if (replacementTradeIdNode.Attributes["href"] != null)
                    {
                        replacementTradeIdIDRef_ = replacementTradeIdNode.Attributes["href"].Value;
                    }
                    else
                    {
                        replacementTradeId_ = new TradeId(replacementTradeIdNode);
                    }
                }
                else
                {
                    replacementTradeId_ = new TradeId(replacementTradeIdNode);
                }
            }


            XmlNodeList originatingTradeIdNodeList = xmlNode.SelectNodes("originatingTradeId");

            if (originatingTradeIdNodeList != null)
            {
                this.originatingTradeId_ = new List <TradeId>();
                foreach (XmlNode item in originatingTradeIdNodeList)
                {
                    if (item.Attributes["href"] != null || item.Attributes["id"] != null)
                    {
                        if (item.Attributes["id"] != null)
                        {
                            originatingTradeIdIDRef_ = item.Attributes["id"].Value;
                            originatingTradeId_.Add(new TradeId(item));
                            IDManager.SetID(originatingTradeIdIDRef_, originatingTradeId_[originatingTradeId_.Count - 1]);
                        }
                        else if (item.Attributes["href"] != null)
                        {
                            originatingTradeIdIDRef_ = item.Attributes["href"].Value;
                        }
                        else
                        {
                            originatingTradeId_.Add(new TradeId(item));
                        }
                    }
                    else
                    {
                        originatingTradeId_.Add(new TradeId(item));
                    }
                }
            }
        }
コード例 #16
0
        public TradeIdentifier(XmlNode xmlNode)
        {
            XmlNodeList issuerNodeList = xmlNode.SelectNodes("issuer");

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

            foreach (XmlNode item in issuerNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        issuerIDRef = item.Attributes["id"].Name;
                        IssuerId ob = IssuerId();
                        IDManager.SetID(issuerIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        issuerIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        issuer = new IssuerId(item);
                    }
                }
            }


            XmlNodeList tradeIdNodeList = xmlNode.SelectNodes("tradeId");

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

            foreach (XmlNode item in tradeIdNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        tradeIdIDRef = item.Attributes["id"].Name;
                        TradeId ob = TradeId();
                        IDManager.SetID(tradeIdIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        tradeIdIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        tradeId = new TradeId(item);
                    }
                }
            }


            XmlNodeList partyReferenceNodeList = xmlNode.SelectNodes("partyReference");

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

            foreach (XmlNode item in partyReferenceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        partyReferenceIDRef = item.Attributes["id"].Name;
                        PartyReference ob = PartyReference();
                        IDManager.SetID(partyReferenceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        partyReferenceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        partyReference = new PartyReference(item);
                    }
                }
            }


            XmlNodeList accountReferenceNodeList = xmlNode.SelectNodes("accountReference");

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

            foreach (XmlNode item in accountReferenceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        accountReferenceIDRef = item.Attributes["id"].Name;
                        AccountReference ob = AccountReference();
                        IDManager.SetID(accountReferenceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        accountReferenceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        accountReference = new AccountReference(item);
                    }
                }
            }


            XmlNodeList versionedTradeIdNodeList = xmlNode.SelectNodes("versionedTradeId");

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

            foreach (XmlNode item in versionedTradeIdNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        versionedTradeIdIDRef = item.Attributes["id"].Name;
                        VersionedTradeId ob = VersionedTradeId();
                        IDManager.SetID(versionedTradeIdIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        versionedTradeIdIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        versionedTradeId = new VersionedTradeId(item);
                    }
                }
            }
        }