public MakeWholeAmount(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNode interpolationMethodNode = xmlNode.SelectSingleNode("interpolationMethod");
     
     if (interpolationMethodNode != null)
     {
         if (interpolationMethodNode.Attributes["href"] != null || interpolationMethodNode.Attributes["id"] != null) 
         {
             if (interpolationMethodNode.Attributes["id"] != null) 
             {
                 interpolationMethodIDRef_ = interpolationMethodNode.Attributes["id"].Value;
                 InterpolationMethod ob = new InterpolationMethod(interpolationMethodNode);
                 IDManager.SetID(interpolationMethodIDRef_, ob);
             }
             else if (interpolationMethodNode.Attributes["href"] != null)
             {
                 interpolationMethodIDRef_ = interpolationMethodNode.Attributes["href"].Value;
             }
             else
             {
                 interpolationMethod_ = new InterpolationMethod(interpolationMethodNode);
             }
         }
         else
         {
             interpolationMethod_ = new InterpolationMethod(interpolationMethodNode);
         }
     }
     
 
     XmlNode earlyCallDateNode = xmlNode.SelectSingleNode("earlyCallDate");
     
     if (earlyCallDateNode != null)
     {
         if (earlyCallDateNode.Attributes["href"] != null || earlyCallDateNode.Attributes["id"] != null) 
         {
             if (earlyCallDateNode.Attributes["id"] != null) 
             {
                 earlyCallDateIDRef_ = earlyCallDateNode.Attributes["id"].Value;
                 IdentifiedDate ob = new IdentifiedDate(earlyCallDateNode);
                 IDManager.SetID(earlyCallDateIDRef_, ob);
             }
             else if (earlyCallDateNode.Attributes["href"] != null)
             {
                 earlyCallDateIDRef_ = earlyCallDateNode.Attributes["href"].Value;
             }
             else
             {
                 earlyCallDate_ = new IdentifiedDate(earlyCallDateNode);
             }
         }
         else
         {
             earlyCallDate_ = new IdentifiedDate(earlyCallDateNode);
         }
     }
     
 
 }
 public MakeWholeAmount(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNodeList interpolationMethodNodeList = xmlNode.SelectNodes("interpolationMethod");
     if (interpolationMethodNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in interpolationMethodNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 interpolationMethodIDRef = item.Attributes["id"].Name;
                 InterpolationMethod ob = InterpolationMethod();
                 IDManager.SetID(interpolationMethodIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 interpolationMethodIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 interpolationMethod = new InterpolationMethod(item);
             }
         }
     }
     
 
     XmlNodeList earlyCallDateNodeList = xmlNode.SelectNodes("earlyCallDate");
     if (earlyCallDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in earlyCallDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 earlyCallDateIDRef = item.Attributes["id"].Name;
                 IdentifiedDate ob = IdentifiedDate();
                 IDManager.SetID(earlyCallDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 earlyCallDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 earlyCallDate = new IdentifiedDate(item);
             }
         }
     }
     
 
 }
        public MakeWholeAmount(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNodeList interpolationMethodNodeList = xmlNode.SelectNodes("interpolationMethod");

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

            foreach (XmlNode item in interpolationMethodNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        interpolationMethodIDRef = item.Attributes["id"].Name;
                        InterpolationMethod ob = InterpolationMethod();
                        IDManager.SetID(interpolationMethodIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        interpolationMethodIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        interpolationMethod = new InterpolationMethod(item);
                    }
                }
            }


            XmlNodeList earlyCallDateNodeList = xmlNode.SelectNodes("earlyCallDate");

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

            foreach (XmlNode item in earlyCallDateNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        earlyCallDateIDRef = item.Attributes["id"].Name;
                        IdentifiedDate ob = IdentifiedDate();
                        IDManager.SetID(earlyCallDateIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        earlyCallDateIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        earlyCallDate = new IdentifiedDate(item);
                    }
                }
            }
        }
 public WeatherCalculationPeriod(XmlNode xmlNode)
 {
     XmlNode calculationPeriodFirstDayNode = xmlNode.SelectSingleNode("calculationPeriodFirstDay");
     
     if (calculationPeriodFirstDayNode != null)
     {
         if (calculationPeriodFirstDayNode.Attributes["href"] != null || calculationPeriodFirstDayNode.Attributes["id"] != null) 
         {
             if (calculationPeriodFirstDayNode.Attributes["id"] != null) 
             {
                 calculationPeriodFirstDayIDRef_ = calculationPeriodFirstDayNode.Attributes["id"].Value;
                 IdentifiedDate ob = new IdentifiedDate(calculationPeriodFirstDayNode);
                 IDManager.SetID(calculationPeriodFirstDayIDRef_, ob);
             }
             else if (calculationPeriodFirstDayNode.Attributes["href"] != null)
             {
                 calculationPeriodFirstDayIDRef_ = calculationPeriodFirstDayNode.Attributes["href"].Value;
             }
             else
             {
                 calculationPeriodFirstDay_ = new IdentifiedDate(calculationPeriodFirstDayNode);
             }
         }
         else
         {
             calculationPeriodFirstDay_ = new IdentifiedDate(calculationPeriodFirstDayNode);
         }
     }
     
 
     XmlNode calculationPeriodEndDayNode = xmlNode.SelectSingleNode("calculationPeriodEndDay");
     
     if (calculationPeriodEndDayNode != null)
     {
         if (calculationPeriodEndDayNode.Attributes["href"] != null || calculationPeriodEndDayNode.Attributes["id"] != null) 
         {
             if (calculationPeriodEndDayNode.Attributes["id"] != null) 
             {
                 calculationPeriodEndDayIDRef_ = calculationPeriodEndDayNode.Attributes["id"].Value;
                 IdentifiedDate ob = new IdentifiedDate(calculationPeriodEndDayNode);
                 IDManager.SetID(calculationPeriodEndDayIDRef_, ob);
             }
             else if (calculationPeriodEndDayNode.Attributes["href"] != null)
             {
                 calculationPeriodEndDayIDRef_ = calculationPeriodEndDayNode.Attributes["href"].Value;
             }
             else
             {
                 calculationPeriodEndDay_ = new IdentifiedDate(calculationPeriodEndDayNode);
             }
         }
         else
         {
             calculationPeriodEndDay_ = new IdentifiedDate(calculationPeriodEndDayNode);
         }
     }
     
 
 }
 public WeatherCalculationPeriod(XmlNode xmlNode)
 {
     XmlNodeList calculationPeriodFirstDayNodeList = xmlNode.SelectNodes("calculationPeriodFirstDay");
     if (calculationPeriodFirstDayNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in calculationPeriodFirstDayNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 calculationPeriodFirstDayIDRef = item.Attributes["id"].Name;
                 IdentifiedDate ob = IdentifiedDate();
                 IDManager.SetID(calculationPeriodFirstDayIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 calculationPeriodFirstDayIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 calculationPeriodFirstDay = new IdentifiedDate(item);
             }
         }
     }
     
 
     XmlNodeList calculationPeriodEndDayNodeList = xmlNode.SelectNodes("calculationPeriodEndDay");
     if (calculationPeriodEndDayNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in calculationPeriodEndDayNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 calculationPeriodEndDayIDRef = item.Attributes["id"].Name;
                 IdentifiedDate ob = IdentifiedDate();
                 IDManager.SetID(calculationPeriodEndDayIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 calculationPeriodEndDayIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 calculationPeriodEndDay = new IdentifiedDate(item);
             }
         }
     }
     
 
 }
        public WeatherCalculationPeriod(XmlNode xmlNode)
        {
            XmlNodeList calculationPeriodFirstDayNodeList = xmlNode.SelectNodes("calculationPeriodFirstDay");

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

            foreach (XmlNode item in calculationPeriodFirstDayNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        calculationPeriodFirstDayIDRef = item.Attributes["id"].Name;
                        IdentifiedDate ob = IdentifiedDate();
                        IDManager.SetID(calculationPeriodFirstDayIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        calculationPeriodFirstDayIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        calculationPeriodFirstDay = new IdentifiedDate(item);
                    }
                }
            }


            XmlNodeList calculationPeriodEndDayNodeList = xmlNode.SelectNodes("calculationPeriodEndDay");

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

            foreach (XmlNode item in calculationPeriodEndDayNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        calculationPeriodEndDayIDRef = item.Attributes["id"].Name;
                        IdentifiedDate ob = IdentifiedDate();
                        IDManager.SetID(calculationPeriodEndDayIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        calculationPeriodEndDayIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        calculationPeriodEndDay = new IdentifiedDate(item);
                    }
                }
            }
        }
        public MakeWholeAmount(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNode interpolationMethodNode = xmlNode.SelectSingleNode("interpolationMethod");

            if (interpolationMethodNode != null)
            {
                if (interpolationMethodNode.Attributes["href"] != null || interpolationMethodNode.Attributes["id"] != null)
                {
                    if (interpolationMethodNode.Attributes["id"] != null)
                    {
                        interpolationMethodIDRef_ = interpolationMethodNode.Attributes["id"].Value;
                        InterpolationMethod ob = new InterpolationMethod(interpolationMethodNode);
                        IDManager.SetID(interpolationMethodIDRef_, ob);
                    }
                    else if (interpolationMethodNode.Attributes["href"] != null)
                    {
                        interpolationMethodIDRef_ = interpolationMethodNode.Attributes["href"].Value;
                    }
                    else
                    {
                        interpolationMethod_ = new InterpolationMethod(interpolationMethodNode);
                    }
                }
                else
                {
                    interpolationMethod_ = new InterpolationMethod(interpolationMethodNode);
                }
            }


            XmlNode earlyCallDateNode = xmlNode.SelectSingleNode("earlyCallDate");

            if (earlyCallDateNode != null)
            {
                if (earlyCallDateNode.Attributes["href"] != null || earlyCallDateNode.Attributes["id"] != null)
                {
                    if (earlyCallDateNode.Attributes["id"] != null)
                    {
                        earlyCallDateIDRef_ = earlyCallDateNode.Attributes["id"].Value;
                        IdentifiedDate ob = new IdentifiedDate(earlyCallDateNode);
                        IDManager.SetID(earlyCallDateIDRef_, ob);
                    }
                    else if (earlyCallDateNode.Attributes["href"] != null)
                    {
                        earlyCallDateIDRef_ = earlyCallDateNode.Attributes["href"].Value;
                    }
                    else
                    {
                        earlyCallDate_ = new IdentifiedDate(earlyCallDateNode);
                    }
                }
                else
                {
                    earlyCallDate_ = new IdentifiedDate(earlyCallDateNode);
                }
            }
        }
Exemple #8
0
        public WeatherCalculationPeriod(XmlNode xmlNode)
        {
            XmlNode calculationPeriodFirstDayNode = xmlNode.SelectSingleNode("calculationPeriodFirstDay");

            if (calculationPeriodFirstDayNode != null)
            {
                if (calculationPeriodFirstDayNode.Attributes["href"] != null || calculationPeriodFirstDayNode.Attributes["id"] != null)
                {
                    if (calculationPeriodFirstDayNode.Attributes["id"] != null)
                    {
                        calculationPeriodFirstDayIDRef_ = calculationPeriodFirstDayNode.Attributes["id"].Value;
                        IdentifiedDate ob = new IdentifiedDate(calculationPeriodFirstDayNode);
                        IDManager.SetID(calculationPeriodFirstDayIDRef_, ob);
                    }
                    else if (calculationPeriodFirstDayNode.Attributes["href"] != null)
                    {
                        calculationPeriodFirstDayIDRef_ = calculationPeriodFirstDayNode.Attributes["href"].Value;
                    }
                    else
                    {
                        calculationPeriodFirstDay_ = new IdentifiedDate(calculationPeriodFirstDayNode);
                    }
                }
                else
                {
                    calculationPeriodFirstDay_ = new IdentifiedDate(calculationPeriodFirstDayNode);
                }
            }


            XmlNode calculationPeriodEndDayNode = xmlNode.SelectSingleNode("calculationPeriodEndDay");

            if (calculationPeriodEndDayNode != null)
            {
                if (calculationPeriodEndDayNode.Attributes["href"] != null || calculationPeriodEndDayNode.Attributes["id"] != null)
                {
                    if (calculationPeriodEndDayNode.Attributes["id"] != null)
                    {
                        calculationPeriodEndDayIDRef_ = calculationPeriodEndDayNode.Attributes["id"].Value;
                        IdentifiedDate ob = new IdentifiedDate(calculationPeriodEndDayNode);
                        IDManager.SetID(calculationPeriodEndDayIDRef_, ob);
                    }
                    else if (calculationPeriodEndDayNode.Attributes["href"] != null)
                    {
                        calculationPeriodEndDayIDRef_ = calculationPeriodEndDayNode.Attributes["href"].Value;
                    }
                    else
                    {
                        calculationPeriodEndDay_ = new IdentifiedDate(calculationPeriodEndDayNode);
                    }
                }
                else
                {
                    calculationPeriodEndDay_ = new IdentifiedDate(calculationPeriodEndDayNode);
                }
            }
        }
 public PricingStructureValuation(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNodeList baseDateNodeList = xmlNode.SelectNodes("baseDate");
     if (baseDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in baseDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 baseDateIDRef = item.Attributes["id"].Name;
                 IdentifiedDate ob = IdentifiedDate();
                 IDManager.SetID(baseDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 baseDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 baseDate = new IdentifiedDate(item);
             }
         }
     }
     
 
     XmlNodeList spotDateNodeList = xmlNode.SelectNodes("spotDate");
     if (spotDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in spotDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 spotDateIDRef = item.Attributes["id"].Name;
                 IdentifiedDate ob = IdentifiedDate();
                 IDManager.SetID(spotDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 spotDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 spotDate = new IdentifiedDate(item);
             }
         }
     }
     
 
     XmlNodeList inputDataDateNodeList = xmlNode.SelectNodes("inputDataDate");
     if (inputDataDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in inputDataDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 inputDataDateIDRef = item.Attributes["id"].Name;
                 IdentifiedDate ob = IdentifiedDate();
                 IDManager.SetID(inputDataDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 inputDataDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 inputDataDate = new IdentifiedDate(item);
             }
         }
     }
     
 
     XmlNodeList endDateNodeList = xmlNode.SelectNodes("endDate");
     if (endDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in endDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 endDateIDRef = item.Attributes["id"].Name;
                 IdentifiedDate ob = IdentifiedDate();
                 IDManager.SetID(endDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 endDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 endDate = new IdentifiedDate(item);
             }
         }
     }
     
 
     XmlNodeList buildDateTimeNodeList = xmlNode.SelectNodes("buildDateTime");
     if (buildDateTimeNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in buildDateTimeNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 buildDateTimeIDRef = item.Attributes["id"].Name;
                 XsdTypeDateTime ob = XsdTypeDateTime();
                 IDManager.SetID(buildDateTimeIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 buildDateTimeIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 buildDateTime = new XsdTypeDateTime(item);
             }
         }
     }
     
 
 }
        public AssetPool(XmlNode xmlNode)
        {
            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);
                }
            }


            XmlNode initialFactorNode = xmlNode.SelectSingleNode("initialFactor");

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


            XmlNode currentFactorNode = xmlNode.SelectSingleNode("currentFactor");

            if (currentFactorNode != null)
            {
                if (currentFactorNode.Attributes["href"] != null || currentFactorNode.Attributes["id"] != null)
                {
                    if (currentFactorNode.Attributes["id"] != null)
                    {
                        currentFactorIDRef_ = currentFactorNode.Attributes["id"].Value;
                        XsdTypeDecimal ob = new XsdTypeDecimal(currentFactorNode);
                        IDManager.SetID(currentFactorIDRef_, ob);
                    }
                    else if (currentFactorNode.Attributes["href"] != null)
                    {
                        currentFactorIDRef_ = currentFactorNode.Attributes["href"].Value;
                    }
                    else
                    {
                        currentFactor_ = new XsdTypeDecimal(currentFactorNode);
                    }
                }
                else
                {
                    currentFactor_ = new XsdTypeDecimal(currentFactorNode);
                }
            }
        }
Exemple #11
0
        public RelativeDateOffset(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNodeList businessDayConventionNodeList = xmlNode.SelectNodes("businessDayConvention");

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

            foreach (XmlNode item in businessDayConventionNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        businessDayConventionIDRef = item.Attributes["id"].Name;
                        BusinessDayConventionEnum ob = BusinessDayConventionEnum();
                        IDManager.SetID(businessDayConventionIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        businessDayConventionIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        businessDayConvention = new BusinessDayConventionEnum(item);
                    }
                }
            }


            XmlNodeList businessCentersReferenceNodeList = xmlNode.SelectNodes("businessCentersReference");

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

            foreach (XmlNode item in businessCentersReferenceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        businessCentersReferenceIDRef = item.Attributes["id"].Name;
                        BusinessCentersReference ob = BusinessCentersReference();
                        IDManager.SetID(businessCentersReferenceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        businessCentersReferenceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        businessCentersReference = new BusinessCentersReference(item);
                    }
                }
            }


            XmlNodeList businessCentersNodeList = xmlNode.SelectNodes("businessCenters");

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

            foreach (XmlNode item in businessCentersNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        businessCentersIDRef = item.Attributes["id"].Name;
                        BusinessCenters ob = BusinessCenters();
                        IDManager.SetID(businessCentersIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        businessCentersIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        businessCenters = new BusinessCenters(item);
                    }
                }
            }


            XmlNodeList dateRelativeToNodeList = xmlNode.SelectNodes("dateRelativeTo");

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

            foreach (XmlNode item in dateRelativeToNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        dateRelativeToIDRef = item.Attributes["id"].Name;
                        DateReference ob = DateReference();
                        IDManager.SetID(dateRelativeToIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        dateRelativeToIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        dateRelativeTo = new DateReference(item);
                    }
                }
            }


            XmlNodeList adjustedDateNodeList = xmlNode.SelectNodes("adjustedDate");

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

            foreach (XmlNode item in adjustedDateNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        adjustedDateIDRef = item.Attributes["id"].Name;
                        IdentifiedDate ob = IdentifiedDate();
                        IDManager.SetID(adjustedDateIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        adjustedDateIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        adjustedDate = new IdentifiedDate(item);
                    }
                }
            }
        }
 public AssetPool(XmlNode xmlNode)
 {
     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);
         }
     }
     
 
     XmlNode initialFactorNode = xmlNode.SelectSingleNode("initialFactor");
     
     if (initialFactorNode != null)
     {
         if (initialFactorNode.Attributes["href"] != null || initialFactorNode.Attributes["id"] != null) 
         {
             if (initialFactorNode.Attributes["id"] != null) 
             {
                 initialFactorIDRef_ = initialFactorNode.Attributes["id"].Value;
                 XsdTypeDecimal ob = new XsdTypeDecimal(initialFactorNode);
                 IDManager.SetID(initialFactorIDRef_, ob);
             }
             else if (initialFactorNode.Attributes["href"] != null)
             {
                 initialFactorIDRef_ = initialFactorNode.Attributes["href"].Value;
             }
             else
             {
                 initialFactor_ = new XsdTypeDecimal(initialFactorNode);
             }
         }
         else
         {
             initialFactor_ = new XsdTypeDecimal(initialFactorNode);
         }
     }
     
 
     XmlNode currentFactorNode = xmlNode.SelectSingleNode("currentFactor");
     
     if (currentFactorNode != null)
     {
         if (currentFactorNode.Attributes["href"] != null || currentFactorNode.Attributes["id"] != null) 
         {
             if (currentFactorNode.Attributes["id"] != null) 
             {
                 currentFactorIDRef_ = currentFactorNode.Attributes["id"].Value;
                 XsdTypeDecimal ob = new XsdTypeDecimal(currentFactorNode);
                 IDManager.SetID(currentFactorIDRef_, ob);
             }
             else if (currentFactorNode.Attributes["href"] != null)
             {
                 currentFactorIDRef_ = currentFactorNode.Attributes["href"].Value;
             }
             else
             {
                 currentFactor_ = new XsdTypeDecimal(currentFactorNode);
             }
         }
         else
         {
             currentFactor_ = new XsdTypeDecimal(currentFactorNode);
         }
     }
     
 
 }
        public TradeHeader(XmlNode xmlNode)
        {
            XmlNodeList partyTradeIdentifierNodeList = xmlNode.SelectNodes("partyTradeIdentifier");

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


            XmlNodeList partyTradeInformationNodeList = xmlNode.SelectNodes("partyTradeInformation");

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


            XmlNode tradeDateNode = xmlNode.SelectSingleNode("tradeDate");

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


            XmlNode clearedDateNode = xmlNode.SelectSingleNode("clearedDate");

            if (clearedDateNode != null)
            {
                if (clearedDateNode.Attributes["href"] != null || clearedDateNode.Attributes["id"] != null)
                {
                    if (clearedDateNode.Attributes["id"] != null)
                    {
                        clearedDateIDRef_ = clearedDateNode.Attributes["id"].Value;
                        IdentifiedDate ob = new IdentifiedDate(clearedDateNode);
                        IDManager.SetID(clearedDateIDRef_, ob);
                    }
                    else if (clearedDateNode.Attributes["href"] != null)
                    {
                        clearedDateIDRef_ = clearedDateNode.Attributes["href"].Value;
                    }
                    else
                    {
                        clearedDate_ = new IdentifiedDate(clearedDateNode);
                    }
                }
                else
                {
                    clearedDate_ = new IdentifiedDate(clearedDateNode);
                }
            }
        }
Exemple #14
0
        public AdjustableDate2(XmlNode xmlNode)
        {
            XmlNode unadjustedDateNode = xmlNode.SelectSingleNode("unadjustedDate");

            if (unadjustedDateNode != null)
            {
                if (unadjustedDateNode.Attributes["href"] != null || unadjustedDateNode.Attributes["id"] != null)
                {
                    if (unadjustedDateNode.Attributes["id"] != null)
                    {
                        unadjustedDateIDRef_ = unadjustedDateNode.Attributes["id"].Value;
                        IdentifiedDate ob = new IdentifiedDate(unadjustedDateNode);
                        IDManager.SetID(unadjustedDateIDRef_, ob);
                    }
                    else if (unadjustedDateNode.Attributes["href"] != null)
                    {
                        unadjustedDateIDRef_ = unadjustedDateNode.Attributes["href"].Value;
                    }
                    else
                    {
                        unadjustedDate_ = new IdentifiedDate(unadjustedDateNode);
                    }
                }
                else
                {
                    unadjustedDate_ = new IdentifiedDate(unadjustedDateNode);
                }
            }


            XmlNode dateAdjustmentsNode = xmlNode.SelectSingleNode("dateAdjustments");

            if (dateAdjustmentsNode != null)
            {
                if (dateAdjustmentsNode.Attributes["href"] != null || dateAdjustmentsNode.Attributes["id"] != null)
                {
                    if (dateAdjustmentsNode.Attributes["id"] != null)
                    {
                        dateAdjustmentsIDRef_ = dateAdjustmentsNode.Attributes["id"].Value;
                        BusinessDayAdjustments ob = new BusinessDayAdjustments(dateAdjustmentsNode);
                        IDManager.SetID(dateAdjustmentsIDRef_, ob);
                    }
                    else if (dateAdjustmentsNode.Attributes["href"] != null)
                    {
                        dateAdjustmentsIDRef_ = dateAdjustmentsNode.Attributes["href"].Value;
                    }
                    else
                    {
                        dateAdjustments_ = new BusinessDayAdjustments(dateAdjustmentsNode);
                    }
                }
                else
                {
                    dateAdjustments_ = new BusinessDayAdjustments(dateAdjustmentsNode);
                }
            }


            XmlNode dateAdjustmentsReferenceNode = xmlNode.SelectSingleNode("dateAdjustmentsReference");

            if (dateAdjustmentsReferenceNode != null)
            {
                if (dateAdjustmentsReferenceNode.Attributes["href"] != null || dateAdjustmentsReferenceNode.Attributes["id"] != null)
                {
                    if (dateAdjustmentsReferenceNode.Attributes["id"] != null)
                    {
                        dateAdjustmentsReferenceIDRef_ = dateAdjustmentsReferenceNode.Attributes["id"].Value;
                        BusinessDayAdjustmentsReference ob = new BusinessDayAdjustmentsReference(dateAdjustmentsReferenceNode);
                        IDManager.SetID(dateAdjustmentsReferenceIDRef_, ob);
                    }
                    else if (dateAdjustmentsReferenceNode.Attributes["href"] != null)
                    {
                        dateAdjustmentsReferenceIDRef_ = dateAdjustmentsReferenceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        dateAdjustmentsReference_ = new BusinessDayAdjustmentsReference(dateAdjustmentsReferenceNode);
                    }
                }
                else
                {
                    dateAdjustmentsReference_ = new BusinessDayAdjustmentsReference(dateAdjustmentsReferenceNode);
                }
            }


            XmlNode adjustedDateNode = xmlNode.SelectSingleNode("adjustedDate");

            if (adjustedDateNode != null)
            {
                if (adjustedDateNode.Attributes["href"] != null || adjustedDateNode.Attributes["id"] != null)
                {
                    if (adjustedDateNode.Attributes["id"] != null)
                    {
                        adjustedDateIDRef_ = adjustedDateNode.Attributes["id"].Value;
                        IdentifiedDate ob = new IdentifiedDate(adjustedDateNode);
                        IDManager.SetID(adjustedDateIDRef_, ob);
                    }
                    else if (adjustedDateNode.Attributes["href"] != null)
                    {
                        adjustedDateIDRef_ = adjustedDateNode.Attributes["href"].Value;
                    }
                    else
                    {
                        adjustedDate_ = new IdentifiedDate(adjustedDateNode);
                    }
                }
                else
                {
                    adjustedDate_ = new IdentifiedDate(adjustedDateNode);
                }
            }
        }
 public AdjustableDate2(XmlNode xmlNode)
 {
     XmlNode unadjustedDateNode = xmlNode.SelectSingleNode("unadjustedDate");
     
     if (unadjustedDateNode != null)
     {
         if (unadjustedDateNode.Attributes["href"] != null || unadjustedDateNode.Attributes["id"] != null) 
         {
             if (unadjustedDateNode.Attributes["id"] != null) 
             {
                 unadjustedDateIDRef_ = unadjustedDateNode.Attributes["id"].Value;
                 IdentifiedDate ob = new IdentifiedDate(unadjustedDateNode);
                 IDManager.SetID(unadjustedDateIDRef_, ob);
             }
             else if (unadjustedDateNode.Attributes["href"] != null)
             {
                 unadjustedDateIDRef_ = unadjustedDateNode.Attributes["href"].Value;
             }
             else
             {
                 unadjustedDate_ = new IdentifiedDate(unadjustedDateNode);
             }
         }
         else
         {
             unadjustedDate_ = new IdentifiedDate(unadjustedDateNode);
         }
     }
     
 
     XmlNode dateAdjustmentsNode = xmlNode.SelectSingleNode("dateAdjustments");
     
     if (dateAdjustmentsNode != null)
     {
         if (dateAdjustmentsNode.Attributes["href"] != null || dateAdjustmentsNode.Attributes["id"] != null) 
         {
             if (dateAdjustmentsNode.Attributes["id"] != null) 
             {
                 dateAdjustmentsIDRef_ = dateAdjustmentsNode.Attributes["id"].Value;
                 BusinessDayAdjustments ob = new BusinessDayAdjustments(dateAdjustmentsNode);
                 IDManager.SetID(dateAdjustmentsIDRef_, ob);
             }
             else if (dateAdjustmentsNode.Attributes["href"] != null)
             {
                 dateAdjustmentsIDRef_ = dateAdjustmentsNode.Attributes["href"].Value;
             }
             else
             {
                 dateAdjustments_ = new BusinessDayAdjustments(dateAdjustmentsNode);
             }
         }
         else
         {
             dateAdjustments_ = new BusinessDayAdjustments(dateAdjustmentsNode);
         }
     }
     
 
     XmlNode dateAdjustmentsReferenceNode = xmlNode.SelectSingleNode("dateAdjustmentsReference");
     
     if (dateAdjustmentsReferenceNode != null)
     {
         if (dateAdjustmentsReferenceNode.Attributes["href"] != null || dateAdjustmentsReferenceNode.Attributes["id"] != null) 
         {
             if (dateAdjustmentsReferenceNode.Attributes["id"] != null) 
             {
                 dateAdjustmentsReferenceIDRef_ = dateAdjustmentsReferenceNode.Attributes["id"].Value;
                 BusinessDayAdjustmentsReference ob = new BusinessDayAdjustmentsReference(dateAdjustmentsReferenceNode);
                 IDManager.SetID(dateAdjustmentsReferenceIDRef_, ob);
             }
             else if (dateAdjustmentsReferenceNode.Attributes["href"] != null)
             {
                 dateAdjustmentsReferenceIDRef_ = dateAdjustmentsReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 dateAdjustmentsReference_ = new BusinessDayAdjustmentsReference(dateAdjustmentsReferenceNode);
             }
         }
         else
         {
             dateAdjustmentsReference_ = new BusinessDayAdjustmentsReference(dateAdjustmentsReferenceNode);
         }
     }
     
 
     XmlNode adjustedDateNode = xmlNode.SelectSingleNode("adjustedDate");
     
     if (adjustedDateNode != null)
     {
         if (adjustedDateNode.Attributes["href"] != null || adjustedDateNode.Attributes["id"] != null) 
         {
             if (adjustedDateNode.Attributes["id"] != null) 
             {
                 adjustedDateIDRef_ = adjustedDateNode.Attributes["id"].Value;
                 IdentifiedDate ob = new IdentifiedDate(adjustedDateNode);
                 IDManager.SetID(adjustedDateIDRef_, ob);
             }
             else if (adjustedDateNode.Attributes["href"] != null)
             {
                 adjustedDateIDRef_ = adjustedDateNode.Attributes["href"].Value;
             }
             else
             {
                 adjustedDate_ = new IdentifiedDate(adjustedDateNode);
             }
         }
         else
         {
             adjustedDate_ = new IdentifiedDate(adjustedDateNode);
         }
     }
     
 
 }
Exemple #16
0
        public AssetPool(XmlNode xmlNode)
        {
            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);
                    }
                }
            }


            XmlNodeList initialFactorNodeList = xmlNode.SelectNodes("initialFactor");

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

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


            XmlNodeList currentFactorNodeList = xmlNode.SelectNodes("currentFactor");

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

            foreach (XmlNode item in currentFactorNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        currentFactorIDRef = item.Attributes["id"].Name;
                        XsdTypeDecimal ob = XsdTypeDecimal();
                        IDManager.SetID(currentFactorIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        currentFactorIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        currentFactor = new XsdTypeDecimal(item);
                    }
                }
            }
        }
 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);
             }
         }
     }
     
 
 }
Exemple #18
0
        public DividendPeriod(XmlNode xmlNode)
        {
            XmlNode unadjustedStartDateNode = xmlNode.SelectSingleNode("unadjustedStartDate");

            if (unadjustedStartDateNode != null)
            {
                if (unadjustedStartDateNode.Attributes["href"] != null || unadjustedStartDateNode.Attributes["id"] != null)
                {
                    if (unadjustedStartDateNode.Attributes["id"] != null)
                    {
                        unadjustedStartDateIDRef_ = unadjustedStartDateNode.Attributes["id"].Value;
                        IdentifiedDate ob = new IdentifiedDate(unadjustedStartDateNode);
                        IDManager.SetID(unadjustedStartDateIDRef_, ob);
                    }
                    else if (unadjustedStartDateNode.Attributes["href"] != null)
                    {
                        unadjustedStartDateIDRef_ = unadjustedStartDateNode.Attributes["href"].Value;
                    }
                    else
                    {
                        unadjustedStartDate_ = new IdentifiedDate(unadjustedStartDateNode);
                    }
                }
                else
                {
                    unadjustedStartDate_ = new IdentifiedDate(unadjustedStartDateNode);
                }
            }


            XmlNode unadjustedEndDateNode = xmlNode.SelectSingleNode("unadjustedEndDate");

            if (unadjustedEndDateNode != null)
            {
                if (unadjustedEndDateNode.Attributes["href"] != null || unadjustedEndDateNode.Attributes["id"] != null)
                {
                    if (unadjustedEndDateNode.Attributes["id"] != null)
                    {
                        unadjustedEndDateIDRef_ = unadjustedEndDateNode.Attributes["id"].Value;
                        IdentifiedDate ob = new IdentifiedDate(unadjustedEndDateNode);
                        IDManager.SetID(unadjustedEndDateIDRef_, ob);
                    }
                    else if (unadjustedEndDateNode.Attributes["href"] != null)
                    {
                        unadjustedEndDateIDRef_ = unadjustedEndDateNode.Attributes["href"].Value;
                    }
                    else
                    {
                        unadjustedEndDate_ = new IdentifiedDate(unadjustedEndDateNode);
                    }
                }
                else
                {
                    unadjustedEndDate_ = new IdentifiedDate(unadjustedEndDateNode);
                }
            }


            XmlNode dateAdjustmentsNode = xmlNode.SelectSingleNode("dateAdjustments");

            if (dateAdjustmentsNode != null)
            {
                if (dateAdjustmentsNode.Attributes["href"] != null || dateAdjustmentsNode.Attributes["id"] != null)
                {
                    if (dateAdjustmentsNode.Attributes["id"] != null)
                    {
                        dateAdjustmentsIDRef_ = dateAdjustmentsNode.Attributes["id"].Value;
                        BusinessDayAdjustments ob = new BusinessDayAdjustments(dateAdjustmentsNode);
                        IDManager.SetID(dateAdjustmentsIDRef_, ob);
                    }
                    else if (dateAdjustmentsNode.Attributes["href"] != null)
                    {
                        dateAdjustmentsIDRef_ = dateAdjustmentsNode.Attributes["href"].Value;
                    }
                    else
                    {
                        dateAdjustments_ = new BusinessDayAdjustments(dateAdjustmentsNode);
                    }
                }
                else
                {
                    dateAdjustments_ = new BusinessDayAdjustments(dateAdjustmentsNode);
                }
            }


            XmlNode underlyerReferenceNode = xmlNode.SelectSingleNode("underlyerReference");

            if (underlyerReferenceNode != null)
            {
                if (underlyerReferenceNode.Attributes["href"] != null || underlyerReferenceNode.Attributes["id"] != null)
                {
                    if (underlyerReferenceNode.Attributes["id"] != null)
                    {
                        underlyerReferenceIDRef_ = underlyerReferenceNode.Attributes["id"].Value;
                        AssetReference ob = new AssetReference(underlyerReferenceNode);
                        IDManager.SetID(underlyerReferenceIDRef_, ob);
                    }
                    else if (underlyerReferenceNode.Attributes["href"] != null)
                    {
                        underlyerReferenceIDRef_ = underlyerReferenceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        underlyerReference_ = new AssetReference(underlyerReferenceNode);
                    }
                }
                else
                {
                    underlyerReference_ = new AssetReference(underlyerReferenceNode);
                }
            }
        }
 public PricingStructureValuation(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNode baseDateNode = xmlNode.SelectSingleNode("baseDate");
     
     if (baseDateNode != null)
     {
         if (baseDateNode.Attributes["href"] != null || baseDateNode.Attributes["id"] != null) 
         {
             if (baseDateNode.Attributes["id"] != null) 
             {
                 baseDateIDRef_ = baseDateNode.Attributes["id"].Value;
                 IdentifiedDate ob = new IdentifiedDate(baseDateNode);
                 IDManager.SetID(baseDateIDRef_, ob);
             }
             else if (baseDateNode.Attributes["href"] != null)
             {
                 baseDateIDRef_ = baseDateNode.Attributes["href"].Value;
             }
             else
             {
                 baseDate_ = new IdentifiedDate(baseDateNode);
             }
         }
         else
         {
             baseDate_ = new IdentifiedDate(baseDateNode);
         }
     }
     
 
     XmlNode spotDateNode = xmlNode.SelectSingleNode("spotDate");
     
     if (spotDateNode != null)
     {
         if (spotDateNode.Attributes["href"] != null || spotDateNode.Attributes["id"] != null) 
         {
             if (spotDateNode.Attributes["id"] != null) 
             {
                 spotDateIDRef_ = spotDateNode.Attributes["id"].Value;
                 IdentifiedDate ob = new IdentifiedDate(spotDateNode);
                 IDManager.SetID(spotDateIDRef_, ob);
             }
             else if (spotDateNode.Attributes["href"] != null)
             {
                 spotDateIDRef_ = spotDateNode.Attributes["href"].Value;
             }
             else
             {
                 spotDate_ = new IdentifiedDate(spotDateNode);
             }
         }
         else
         {
             spotDate_ = new IdentifiedDate(spotDateNode);
         }
     }
     
 
     XmlNode inputDataDateNode = xmlNode.SelectSingleNode("inputDataDate");
     
     if (inputDataDateNode != null)
     {
         if (inputDataDateNode.Attributes["href"] != null || inputDataDateNode.Attributes["id"] != null) 
         {
             if (inputDataDateNode.Attributes["id"] != null) 
             {
                 inputDataDateIDRef_ = inputDataDateNode.Attributes["id"].Value;
                 IdentifiedDate ob = new IdentifiedDate(inputDataDateNode);
                 IDManager.SetID(inputDataDateIDRef_, ob);
             }
             else if (inputDataDateNode.Attributes["href"] != null)
             {
                 inputDataDateIDRef_ = inputDataDateNode.Attributes["href"].Value;
             }
             else
             {
                 inputDataDate_ = new IdentifiedDate(inputDataDateNode);
             }
         }
         else
         {
             inputDataDate_ = new IdentifiedDate(inputDataDateNode);
         }
     }
     
 
     XmlNode endDateNode = xmlNode.SelectSingleNode("endDate");
     
     if (endDateNode != null)
     {
         if (endDateNode.Attributes["href"] != null || endDateNode.Attributes["id"] != null) 
         {
             if (endDateNode.Attributes["id"] != null) 
             {
                 endDateIDRef_ = endDateNode.Attributes["id"].Value;
                 IdentifiedDate ob = new IdentifiedDate(endDateNode);
                 IDManager.SetID(endDateIDRef_, ob);
             }
             else if (endDateNode.Attributes["href"] != null)
             {
                 endDateIDRef_ = endDateNode.Attributes["href"].Value;
             }
             else
             {
                 endDate_ = new IdentifiedDate(endDateNode);
             }
         }
         else
         {
             endDate_ = new IdentifiedDate(endDateNode);
         }
     }
     
 
     XmlNode buildDateTimeNode = xmlNode.SelectSingleNode("buildDateTime");
     
     if (buildDateTimeNode != null)
     {
         if (buildDateTimeNode.Attributes["href"] != null || buildDateTimeNode.Attributes["id"] != null) 
         {
             if (buildDateTimeNode.Attributes["id"] != null) 
             {
                 buildDateTimeIDRef_ = buildDateTimeNode.Attributes["id"].Value;
                 XsdTypeDateTime ob = new XsdTypeDateTime(buildDateTimeNode);
                 IDManager.SetID(buildDateTimeIDRef_, ob);
             }
             else if (buildDateTimeNode.Attributes["href"] != null)
             {
                 buildDateTimeIDRef_ = buildDateTimeNode.Attributes["href"].Value;
             }
             else
             {
                 buildDateTime_ = new XsdTypeDateTime(buildDateTimeNode);
             }
         }
         else
         {
             buildDateTime_ = new XsdTypeDateTime(buildDateTimeNode);
         }
     }
     
 
 }
        public AdjustableOrAdjustedDate(XmlNode xmlNode)
        {
            XmlNodeList unadjustedDateNodeList = xmlNode.SelectNodes("unadjustedDate");

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

            foreach (XmlNode item in unadjustedDateNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        unadjustedDateIDRef = item.Attributes["id"].Name;
                        IdentifiedDate ob = IdentifiedDate();
                        IDManager.SetID(unadjustedDateIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        unadjustedDateIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        unadjustedDate = new IdentifiedDate(item);
                    }
                }
            }


            XmlNodeList dateAdjustmentsNodeList = xmlNode.SelectNodes("dateAdjustments");

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

            foreach (XmlNode item in dateAdjustmentsNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        dateAdjustmentsIDRef = item.Attributes["id"].Name;
                        BusinessDayAdjustments ob = BusinessDayAdjustments();
                        IDManager.SetID(dateAdjustmentsIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        dateAdjustmentsIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        dateAdjustments = new BusinessDayAdjustments(item);
                    }
                }
            }


            XmlNodeList adjustedDateNodeList = xmlNode.SelectNodes("adjustedDate");

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

            foreach (XmlNode item in adjustedDateNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        adjustedDateIDRef = item.Attributes["id"].Name;
                        IdentifiedDate ob = IdentifiedDate();
                        IDManager.SetID(adjustedDateIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        adjustedDateIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        adjustedDate = new IdentifiedDate(item);
                    }
                }
            }
        }
        public PricingStructureValuation(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNode baseDateNode = xmlNode.SelectSingleNode("baseDate");

            if (baseDateNode != null)
            {
                if (baseDateNode.Attributes["href"] != null || baseDateNode.Attributes["id"] != null)
                {
                    if (baseDateNode.Attributes["id"] != null)
                    {
                        baseDateIDRef_ = baseDateNode.Attributes["id"].Value;
                        IdentifiedDate ob = new IdentifiedDate(baseDateNode);
                        IDManager.SetID(baseDateIDRef_, ob);
                    }
                    else if (baseDateNode.Attributes["href"] != null)
                    {
                        baseDateIDRef_ = baseDateNode.Attributes["href"].Value;
                    }
                    else
                    {
                        baseDate_ = new IdentifiedDate(baseDateNode);
                    }
                }
                else
                {
                    baseDate_ = new IdentifiedDate(baseDateNode);
                }
            }


            XmlNode spotDateNode = xmlNode.SelectSingleNode("spotDate");

            if (spotDateNode != null)
            {
                if (spotDateNode.Attributes["href"] != null || spotDateNode.Attributes["id"] != null)
                {
                    if (spotDateNode.Attributes["id"] != null)
                    {
                        spotDateIDRef_ = spotDateNode.Attributes["id"].Value;
                        IdentifiedDate ob = new IdentifiedDate(spotDateNode);
                        IDManager.SetID(spotDateIDRef_, ob);
                    }
                    else if (spotDateNode.Attributes["href"] != null)
                    {
                        spotDateIDRef_ = spotDateNode.Attributes["href"].Value;
                    }
                    else
                    {
                        spotDate_ = new IdentifiedDate(spotDateNode);
                    }
                }
                else
                {
                    spotDate_ = new IdentifiedDate(spotDateNode);
                }
            }


            XmlNode inputDataDateNode = xmlNode.SelectSingleNode("inputDataDate");

            if (inputDataDateNode != null)
            {
                if (inputDataDateNode.Attributes["href"] != null || inputDataDateNode.Attributes["id"] != null)
                {
                    if (inputDataDateNode.Attributes["id"] != null)
                    {
                        inputDataDateIDRef_ = inputDataDateNode.Attributes["id"].Value;
                        IdentifiedDate ob = new IdentifiedDate(inputDataDateNode);
                        IDManager.SetID(inputDataDateIDRef_, ob);
                    }
                    else if (inputDataDateNode.Attributes["href"] != null)
                    {
                        inputDataDateIDRef_ = inputDataDateNode.Attributes["href"].Value;
                    }
                    else
                    {
                        inputDataDate_ = new IdentifiedDate(inputDataDateNode);
                    }
                }
                else
                {
                    inputDataDate_ = new IdentifiedDate(inputDataDateNode);
                }
            }


            XmlNode endDateNode = xmlNode.SelectSingleNode("endDate");

            if (endDateNode != null)
            {
                if (endDateNode.Attributes["href"] != null || endDateNode.Attributes["id"] != null)
                {
                    if (endDateNode.Attributes["id"] != null)
                    {
                        endDateIDRef_ = endDateNode.Attributes["id"].Value;
                        IdentifiedDate ob = new IdentifiedDate(endDateNode);
                        IDManager.SetID(endDateIDRef_, ob);
                    }
                    else if (endDateNode.Attributes["href"] != null)
                    {
                        endDateIDRef_ = endDateNode.Attributes["href"].Value;
                    }
                    else
                    {
                        endDate_ = new IdentifiedDate(endDateNode);
                    }
                }
                else
                {
                    endDate_ = new IdentifiedDate(endDateNode);
                }
            }


            XmlNode buildDateTimeNode = xmlNode.SelectSingleNode("buildDateTime");

            if (buildDateTimeNode != null)
            {
                if (buildDateTimeNode.Attributes["href"] != null || buildDateTimeNode.Attributes["id"] != null)
                {
                    if (buildDateTimeNode.Attributes["id"] != null)
                    {
                        buildDateTimeIDRef_ = buildDateTimeNode.Attributes["id"].Value;
                        XsdTypeDateTime ob = new XsdTypeDateTime(buildDateTimeNode);
                        IDManager.SetID(buildDateTimeIDRef_, ob);
                    }
                    else if (buildDateTimeNode.Attributes["href"] != null)
                    {
                        buildDateTimeIDRef_ = buildDateTimeNode.Attributes["href"].Value;
                    }
                    else
                    {
                        buildDateTime_ = new XsdTypeDateTime(buildDateTimeNode);
                    }
                }
                else
                {
                    buildDateTime_ = new XsdTypeDateTime(buildDateTimeNode);
                }
            }
        }
        public RelativeDateOffset(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNode businessDayConventionNode = xmlNode.SelectSingleNode("businessDayConvention");

            if (businessDayConventionNode != null)
            {
                if (businessDayConventionNode.Attributes["href"] != null || businessDayConventionNode.Attributes["id"] != null)
                {
                    if (businessDayConventionNode.Attributes["id"] != null)
                    {
                        businessDayConventionIDRef_ = businessDayConventionNode.Attributes["id"].Value;
                        BusinessDayConventionEnum ob = new BusinessDayConventionEnum(businessDayConventionNode);
                        IDManager.SetID(businessDayConventionIDRef_, ob);
                    }
                    else if (businessDayConventionNode.Attributes["href"] != null)
                    {
                        businessDayConventionIDRef_ = businessDayConventionNode.Attributes["href"].Value;
                    }
                    else
                    {
                        businessDayConvention_ = new BusinessDayConventionEnum(businessDayConventionNode);
                    }
                }
                else
                {
                    businessDayConvention_ = new BusinessDayConventionEnum(businessDayConventionNode);
                }
            }


            XmlNode businessCentersReferenceNode = xmlNode.SelectSingleNode("businessCentersReference");

            if (businessCentersReferenceNode != null)
            {
                if (businessCentersReferenceNode.Attributes["href"] != null || businessCentersReferenceNode.Attributes["id"] != null)
                {
                    if (businessCentersReferenceNode.Attributes["id"] != null)
                    {
                        businessCentersReferenceIDRef_ = businessCentersReferenceNode.Attributes["id"].Value;
                        BusinessCentersReference ob = new BusinessCentersReference(businessCentersReferenceNode);
                        IDManager.SetID(businessCentersReferenceIDRef_, ob);
                    }
                    else if (businessCentersReferenceNode.Attributes["href"] != null)
                    {
                        businessCentersReferenceIDRef_ = businessCentersReferenceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        businessCentersReference_ = new BusinessCentersReference(businessCentersReferenceNode);
                    }
                }
                else
                {
                    businessCentersReference_ = new BusinessCentersReference(businessCentersReferenceNode);
                }
            }


            XmlNode businessCentersNode = xmlNode.SelectSingleNode("businessCenters");

            if (businessCentersNode != null)
            {
                if (businessCentersNode.Attributes["href"] != null || businessCentersNode.Attributes["id"] != null)
                {
                    if (businessCentersNode.Attributes["id"] != null)
                    {
                        businessCentersIDRef_ = businessCentersNode.Attributes["id"].Value;
                        BusinessCenters ob = new BusinessCenters(businessCentersNode);
                        IDManager.SetID(businessCentersIDRef_, ob);
                    }
                    else if (businessCentersNode.Attributes["href"] != null)
                    {
                        businessCentersIDRef_ = businessCentersNode.Attributes["href"].Value;
                    }
                    else
                    {
                        businessCenters_ = new BusinessCenters(businessCentersNode);
                    }
                }
                else
                {
                    businessCenters_ = new BusinessCenters(businessCentersNode);
                }
            }


            XmlNode dateRelativeToNode = xmlNode.SelectSingleNode("dateRelativeTo");

            if (dateRelativeToNode != null)
            {
                if (dateRelativeToNode.Attributes["href"] != null || dateRelativeToNode.Attributes["id"] != null)
                {
                    if (dateRelativeToNode.Attributes["id"] != null)
                    {
                        dateRelativeToIDRef_ = dateRelativeToNode.Attributes["id"].Value;
                        DateReference ob = new DateReference(dateRelativeToNode);
                        IDManager.SetID(dateRelativeToIDRef_, ob);
                    }
                    else if (dateRelativeToNode.Attributes["href"] != null)
                    {
                        dateRelativeToIDRef_ = dateRelativeToNode.Attributes["href"].Value;
                    }
                    else
                    {
                        dateRelativeTo_ = new DateReference(dateRelativeToNode);
                    }
                }
                else
                {
                    dateRelativeTo_ = new DateReference(dateRelativeToNode);
                }
            }


            XmlNode adjustedDateNode = xmlNode.SelectSingleNode("adjustedDate");

            if (adjustedDateNode != null)
            {
                if (adjustedDateNode.Attributes["href"] != null || adjustedDateNode.Attributes["id"] != null)
                {
                    if (adjustedDateNode.Attributes["id"] != null)
                    {
                        adjustedDateIDRef_ = adjustedDateNode.Attributes["id"].Value;
                        IdentifiedDate ob = new IdentifiedDate(adjustedDateNode);
                        IDManager.SetID(adjustedDateIDRef_, ob);
                    }
                    else if (adjustedDateNode.Attributes["href"] != null)
                    {
                        adjustedDateIDRef_ = adjustedDateNode.Attributes["href"].Value;
                    }
                    else
                    {
                        adjustedDate_ = new IdentifiedDate(adjustedDateNode);
                    }
                }
                else
                {
                    adjustedDate_ = new IdentifiedDate(adjustedDateNode);
                }
            }
        }
 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 ValuationScenario(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 valuationDateNode = xmlNode.SelectSingleNode("valuationDate");
     
     if (valuationDateNode != null)
     {
         if (valuationDateNode.Attributes["href"] != null || valuationDateNode.Attributes["id"] != null) 
         {
             if (valuationDateNode.Attributes["id"] != null) 
             {
                 valuationDateIDRef_ = valuationDateNode.Attributes["id"].Value;
                 IdentifiedDate ob = new IdentifiedDate(valuationDateNode);
                 IDManager.SetID(valuationDateIDRef_, ob);
             }
             else if (valuationDateNode.Attributes["href"] != null)
             {
                 valuationDateIDRef_ = valuationDateNode.Attributes["href"].Value;
             }
             else
             {
                 valuationDate_ = new IdentifiedDate(valuationDateNode);
             }
         }
         else
         {
             valuationDate_ = new IdentifiedDate(valuationDateNode);
         }
     }
     
 
     XmlNode marketReferenceNode = xmlNode.SelectSingleNode("marketReference");
     
     if (marketReferenceNode != null)
     {
         if (marketReferenceNode.Attributes["href"] != null || marketReferenceNode.Attributes["id"] != null) 
         {
             if (marketReferenceNode.Attributes["id"] != null) 
             {
                 marketReferenceIDRef_ = marketReferenceNode.Attributes["id"].Value;
                 MarketReference ob = new MarketReference(marketReferenceNode);
                 IDManager.SetID(marketReferenceIDRef_, ob);
             }
             else if (marketReferenceNode.Attributes["href"] != null)
             {
                 marketReferenceIDRef_ = marketReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 marketReference_ = new MarketReference(marketReferenceNode);
             }
         }
         else
         {
             marketReference_ = new MarketReference(marketReferenceNode);
         }
     }
     
 
     XmlNodeList shiftNodeList = xmlNode.SelectNodes("shift");
     
     if (shiftNodeList != null)
     {
         this.shift_ = new List<PricingParameterShift>();
         foreach (XmlNode item in shiftNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     shiftIDRef_ = item.Attributes["id"].Value;
                     shift_.Add(new PricingParameterShift(item));
                     IDManager.SetID(shiftIDRef_, shift_[shift_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     shiftIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 shift_.Add(new PricingParameterShift(item));
                 }
             }
             else
             {
                 shift_.Add(new PricingParameterShift(item));
             }
         }
     }
     
 
     XmlNodeList replacementNodeList = xmlNode.SelectNodes("replacement");
     
     if (replacementNodeList != null)
     {
         this.replacement_ = new List<PricingInputReplacement>();
         foreach (XmlNode item in replacementNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     replacementIDRef_ = item.Attributes["id"].Value;
                     replacement_.Add(new PricingInputReplacement(item));
                     IDManager.SetID(replacementIDRef_, replacement_[replacement_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     replacementIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 replacement_.Add(new PricingInputReplacement(item));
                 }
             }
             else
             {
                 replacement_.Add(new PricingInputReplacement(item));
             }
         }
     }
     
 
 }
        public TradeHeader(XmlNode xmlNode)
        {
            XmlNodeList partyTradeIdentifierNodeList = xmlNode.SelectNodes("partyTradeIdentifier");

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


            XmlNodeList partyTradeInformationNodeList = xmlNode.SelectNodes("partyTradeInformation");

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


            XmlNodeList tradeDateNodeList = xmlNode.SelectNodes("tradeDate");

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

            foreach (XmlNode item in tradeDateNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        tradeDateIDRef = item.Attributes["id"].Name;
                        IdentifiedDate ob = IdentifiedDate();
                        IDManager.SetID(tradeDateIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        tradeDateIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        tradeDate = new IdentifiedDate(item);
                    }
                }
            }


            XmlNodeList clearedDateNodeList = xmlNode.SelectNodes("clearedDate");

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

            foreach (XmlNode item in clearedDateNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        clearedDateIDRef = item.Attributes["id"].Name;
                        IdentifiedDate ob = IdentifiedDate();
                        IDManager.SetID(clearedDateIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        clearedDateIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        clearedDate = new IdentifiedDate(item);
                    }
                }
            }
        }
Exemple #26
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 AdjustableOrAdjustedDate(XmlNode xmlNode)
 {
     XmlNodeList unadjustedDateNodeList = xmlNode.SelectNodes("unadjustedDate");
     if (unadjustedDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in unadjustedDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 unadjustedDateIDRef = item.Attributes["id"].Name;
                 IdentifiedDate ob = IdentifiedDate();
                 IDManager.SetID(unadjustedDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 unadjustedDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 unadjustedDate = new IdentifiedDate(item);
             }
         }
     }
     
 
     XmlNodeList dateAdjustmentsNodeList = xmlNode.SelectNodes("dateAdjustments");
     if (dateAdjustmentsNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in dateAdjustmentsNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 dateAdjustmentsIDRef = item.Attributes["id"].Name;
                 BusinessDayAdjustments ob = BusinessDayAdjustments();
                 IDManager.SetID(dateAdjustmentsIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 dateAdjustmentsIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 dateAdjustments = new BusinessDayAdjustments(item);
             }
         }
     }
     
 
     XmlNodeList adjustedDateNodeList = xmlNode.SelectNodes("adjustedDate");
     if (adjustedDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in adjustedDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 adjustedDateIDRef = item.Attributes["id"].Name;
                 IdentifiedDate ob = IdentifiedDate();
                 IDManager.SetID(adjustedDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 adjustedDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 adjustedDate = new IdentifiedDate(item);
             }
         }
     }
     
 
 }
Exemple #28
0
        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 RelativeDateOffset(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNodeList businessDayConventionNodeList = xmlNode.SelectNodes("businessDayConvention");
     if (businessDayConventionNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in businessDayConventionNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 businessDayConventionIDRef = item.Attributes["id"].Name;
                 BusinessDayConventionEnum ob = BusinessDayConventionEnum();
                 IDManager.SetID(businessDayConventionIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 businessDayConventionIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 businessDayConvention = new BusinessDayConventionEnum(item);
             }
         }
     }
     
 
     XmlNodeList businessCentersReferenceNodeList = xmlNode.SelectNodes("businessCentersReference");
     if (businessCentersReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in businessCentersReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 businessCentersReferenceIDRef = item.Attributes["id"].Name;
                 BusinessCentersReference ob = BusinessCentersReference();
                 IDManager.SetID(businessCentersReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 businessCentersReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 businessCentersReference = new BusinessCentersReference(item);
             }
         }
     }
     
 
     XmlNodeList businessCentersNodeList = xmlNode.SelectNodes("businessCenters");
     if (businessCentersNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in businessCentersNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 businessCentersIDRef = item.Attributes["id"].Name;
                 BusinessCenters ob = BusinessCenters();
                 IDManager.SetID(businessCentersIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 businessCentersIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 businessCenters = new BusinessCenters(item);
             }
         }
     }
     
 
     XmlNodeList dateRelativeToNodeList = xmlNode.SelectNodes("dateRelativeTo");
     if (dateRelativeToNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in dateRelativeToNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 dateRelativeToIDRef = item.Attributes["id"].Name;
                 DateReference ob = DateReference();
                 IDManager.SetID(dateRelativeToIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 dateRelativeToIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 dateRelativeTo = new DateReference(item);
             }
         }
     }
     
 
     XmlNodeList adjustedDateNodeList = xmlNode.SelectNodes("adjustedDate");
     if (adjustedDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in adjustedDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 adjustedDateIDRef = item.Attributes["id"].Name;
                 IdentifiedDate ob = IdentifiedDate();
                 IDManager.SetID(adjustedDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 adjustedDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 adjustedDate = new IdentifiedDate(item);
             }
         }
     }
     
 
 }
Exemple #30
0
        public LegIdentifier(XmlNode xmlNode)
        {
            XmlNode legIdNode = xmlNode.SelectSingleNode("legId");

            if (legIdNode != null)
            {
                if (legIdNode.Attributes["href"] != null || legIdNode.Attributes["id"] != null)
                {
                    if (legIdNode.Attributes["id"] != null)
                    {
                        legIdIDRef_ = legIdNode.Attributes["id"].Value;
                        LegId ob = new LegId(legIdNode);
                        IDManager.SetID(legIdIDRef_, ob);
                    }
                    else if (legIdNode.Attributes["href"] != null)
                    {
                        legIdIDRef_ = legIdNode.Attributes["href"].Value;
                    }
                    else
                    {
                        legId_ = new LegId(legIdNode);
                    }
                }
                else
                {
                    legId_ = new LegId(legIdNode);
                }
            }


            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 RelativeDateOffset(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNode businessDayConventionNode = xmlNode.SelectSingleNode("businessDayConvention");
     
     if (businessDayConventionNode != null)
     {
         if (businessDayConventionNode.Attributes["href"] != null || businessDayConventionNode.Attributes["id"] != null) 
         {
             if (businessDayConventionNode.Attributes["id"] != null) 
             {
                 businessDayConventionIDRef_ = businessDayConventionNode.Attributes["id"].Value;
                 BusinessDayConventionEnum ob = new BusinessDayConventionEnum(businessDayConventionNode);
                 IDManager.SetID(businessDayConventionIDRef_, ob);
             }
             else if (businessDayConventionNode.Attributes["href"] != null)
             {
                 businessDayConventionIDRef_ = businessDayConventionNode.Attributes["href"].Value;
             }
             else
             {
                 businessDayConvention_ = new BusinessDayConventionEnum(businessDayConventionNode);
             }
         }
         else
         {
             businessDayConvention_ = new BusinessDayConventionEnum(businessDayConventionNode);
         }
     }
     
 
     XmlNode businessCentersReferenceNode = xmlNode.SelectSingleNode("businessCentersReference");
     
     if (businessCentersReferenceNode != null)
     {
         if (businessCentersReferenceNode.Attributes["href"] != null || businessCentersReferenceNode.Attributes["id"] != null) 
         {
             if (businessCentersReferenceNode.Attributes["id"] != null) 
             {
                 businessCentersReferenceIDRef_ = businessCentersReferenceNode.Attributes["id"].Value;
                 BusinessCentersReference ob = new BusinessCentersReference(businessCentersReferenceNode);
                 IDManager.SetID(businessCentersReferenceIDRef_, ob);
             }
             else if (businessCentersReferenceNode.Attributes["href"] != null)
             {
                 businessCentersReferenceIDRef_ = businessCentersReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 businessCentersReference_ = new BusinessCentersReference(businessCentersReferenceNode);
             }
         }
         else
         {
             businessCentersReference_ = new BusinessCentersReference(businessCentersReferenceNode);
         }
     }
     
 
     XmlNode businessCentersNode = xmlNode.SelectSingleNode("businessCenters");
     
     if (businessCentersNode != null)
     {
         if (businessCentersNode.Attributes["href"] != null || businessCentersNode.Attributes["id"] != null) 
         {
             if (businessCentersNode.Attributes["id"] != null) 
             {
                 businessCentersIDRef_ = businessCentersNode.Attributes["id"].Value;
                 BusinessCenters ob = new BusinessCenters(businessCentersNode);
                 IDManager.SetID(businessCentersIDRef_, ob);
             }
             else if (businessCentersNode.Attributes["href"] != null)
             {
                 businessCentersIDRef_ = businessCentersNode.Attributes["href"].Value;
             }
             else
             {
                 businessCenters_ = new BusinessCenters(businessCentersNode);
             }
         }
         else
         {
             businessCenters_ = new BusinessCenters(businessCentersNode);
         }
     }
     
 
     XmlNode dateRelativeToNode = xmlNode.SelectSingleNode("dateRelativeTo");
     
     if (dateRelativeToNode != null)
     {
         if (dateRelativeToNode.Attributes["href"] != null || dateRelativeToNode.Attributes["id"] != null) 
         {
             if (dateRelativeToNode.Attributes["id"] != null) 
             {
                 dateRelativeToIDRef_ = dateRelativeToNode.Attributes["id"].Value;
                 DateReference ob = new DateReference(dateRelativeToNode);
                 IDManager.SetID(dateRelativeToIDRef_, ob);
             }
             else if (dateRelativeToNode.Attributes["href"] != null)
             {
                 dateRelativeToIDRef_ = dateRelativeToNode.Attributes["href"].Value;
             }
             else
             {
                 dateRelativeTo_ = new DateReference(dateRelativeToNode);
             }
         }
         else
         {
             dateRelativeTo_ = new DateReference(dateRelativeToNode);
         }
     }
     
 
     XmlNode adjustedDateNode = xmlNode.SelectSingleNode("adjustedDate");
     
     if (adjustedDateNode != null)
     {
         if (adjustedDateNode.Attributes["href"] != null || adjustedDateNode.Attributes["id"] != null) 
         {
             if (adjustedDateNode.Attributes["id"] != null) 
             {
                 adjustedDateIDRef_ = adjustedDateNode.Attributes["id"].Value;
                 IdentifiedDate ob = new IdentifiedDate(adjustedDateNode);
                 IDManager.SetID(adjustedDateIDRef_, ob);
             }
             else if (adjustedDateNode.Attributes["href"] != null)
             {
                 adjustedDateIDRef_ = adjustedDateNode.Attributes["href"].Value;
             }
             else
             {
                 adjustedDate_ = new IdentifiedDate(adjustedDateNode);
             }
         }
         else
         {
             adjustedDate_ = new IdentifiedDate(adjustedDateNode);
         }
     }
     
 
 }
 public DividendPeriod(XmlNode xmlNode)
 {
     XmlNodeList unadjustedStartDateNodeList = xmlNode.SelectNodes("unadjustedStartDate");
     if (unadjustedStartDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in unadjustedStartDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 unadjustedStartDateIDRef = item.Attributes["id"].Name;
                 IdentifiedDate ob = IdentifiedDate();
                 IDManager.SetID(unadjustedStartDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 unadjustedStartDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 unadjustedStartDate = new IdentifiedDate(item);
             }
         }
     }
     
 
     XmlNodeList unadjustedEndDateNodeList = xmlNode.SelectNodes("unadjustedEndDate");
     if (unadjustedEndDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in unadjustedEndDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 unadjustedEndDateIDRef = item.Attributes["id"].Name;
                 IdentifiedDate ob = IdentifiedDate();
                 IDManager.SetID(unadjustedEndDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 unadjustedEndDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 unadjustedEndDate = new IdentifiedDate(item);
             }
         }
     }
     
 
     XmlNodeList dateAdjustmentsNodeList = xmlNode.SelectNodes("dateAdjustments");
     if (dateAdjustmentsNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in dateAdjustmentsNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 dateAdjustmentsIDRef = item.Attributes["id"].Name;
                 BusinessDayAdjustments ob = BusinessDayAdjustments();
                 IDManager.SetID(dateAdjustmentsIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 dateAdjustmentsIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 dateAdjustments = new BusinessDayAdjustments(item);
             }
         }
     }
     
 
     XmlNodeList underlyerReferenceNodeList = xmlNode.SelectNodes("underlyerReference");
     if (underlyerReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in underlyerReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 underlyerReferenceIDRef = item.Attributes["id"].Name;
                 AssetReference ob = AssetReference();
                 IDManager.SetID(underlyerReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 underlyerReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 underlyerReference = new AssetReference(item);
             }
         }
     }
     
 
 }
 public AssetPool(XmlNode xmlNode)
 {
     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);
             }
         }
     }
     
 
     XmlNodeList initialFactorNodeList = xmlNode.SelectNodes("initialFactor");
     if (initialFactorNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in initialFactorNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 initialFactorIDRef = item.Attributes["id"].Name;
                 XsdTypeDecimal ob = XsdTypeDecimal();
                 IDManager.SetID(initialFactorIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 initialFactorIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 initialFactor = new XsdTypeDecimal(item);
             }
         }
     }
     
 
     XmlNodeList currentFactorNodeList = xmlNode.SelectNodes("currentFactor");
     if (currentFactorNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in currentFactorNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 currentFactorIDRef = item.Attributes["id"].Name;
                 XsdTypeDecimal ob = XsdTypeDecimal();
                 IDManager.SetID(currentFactorIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 currentFactorIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 currentFactor = new XsdTypeDecimal(item);
             }
         }
     }
     
 
 }
Exemple #34
0
        public DividendPeriod(XmlNode xmlNode)
        {
            XmlNodeList unadjustedStartDateNodeList = xmlNode.SelectNodes("unadjustedStartDate");

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

            foreach (XmlNode item in unadjustedStartDateNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        unadjustedStartDateIDRef = item.Attributes["id"].Name;
                        IdentifiedDate ob = IdentifiedDate();
                        IDManager.SetID(unadjustedStartDateIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        unadjustedStartDateIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        unadjustedStartDate = new IdentifiedDate(item);
                    }
                }
            }


            XmlNodeList unadjustedEndDateNodeList = xmlNode.SelectNodes("unadjustedEndDate");

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

            foreach (XmlNode item in unadjustedEndDateNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        unadjustedEndDateIDRef = item.Attributes["id"].Name;
                        IdentifiedDate ob = IdentifiedDate();
                        IDManager.SetID(unadjustedEndDateIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        unadjustedEndDateIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        unadjustedEndDate = new IdentifiedDate(item);
                    }
                }
            }


            XmlNodeList dateAdjustmentsNodeList = xmlNode.SelectNodes("dateAdjustments");

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

            foreach (XmlNode item in dateAdjustmentsNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        dateAdjustmentsIDRef = item.Attributes["id"].Name;
                        BusinessDayAdjustments ob = BusinessDayAdjustments();
                        IDManager.SetID(dateAdjustmentsIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        dateAdjustmentsIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        dateAdjustments = new BusinessDayAdjustments(item);
                    }
                }
            }


            XmlNodeList underlyerReferenceNodeList = xmlNode.SelectNodes("underlyerReference");

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

            foreach (XmlNode item in underlyerReferenceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        underlyerReferenceIDRef = item.Attributes["id"].Name;
                        AssetReference ob = AssetReference();
                        IDManager.SetID(underlyerReferenceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        underlyerReferenceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        underlyerReference = new AssetReference(item);
                    }
                }
            }
        }
Exemple #35
0
        public VersionedContractId(XmlNode xmlNode)
        {
            XmlNode contractIdNode = xmlNode.SelectSingleNode("contractId");

            if (contractIdNode != null)
            {
                if (contractIdNode.Attributes["href"] != null || contractIdNode.Attributes["id"] != null)
                {
                    if (contractIdNode.Attributes["id"] != null)
                    {
                        contractIdIDRef_ = contractIdNode.Attributes["id"].Value;
                        ContractId ob = new ContractId(contractIdNode);
                        IDManager.SetID(contractIdIDRef_, ob);
                    }
                    else if (contractIdNode.Attributes["href"] != null)
                    {
                        contractIdIDRef_ = contractIdNode.Attributes["href"].Value;
                    }
                    else
                    {
                        contractId_ = new ContractId(contractIdNode);
                    }
                }
                else
                {
                    contractId_ = new ContractId(contractIdNode);
                }
            }


            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 TradeHeader(XmlNode xmlNode)
 {
     XmlNodeList partyTradeIdentifierNodeList = xmlNode.SelectNodes("partyTradeIdentifier");
     
     foreach (XmlNode item in partyTradeIdentifierNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 partyTradeIdentifierIDRef = item.Attributes["id"].Name;
                 List<PartyTradeIdentifier> ob = new List<PartyTradeIdentifier>();
                 ob.Add(new PartyTradeIdentifier(item));
                 IDManager.SetID(partyTradeIdentifierIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 partyTradeIdentifierIDRef = item.Attributes["href"].Name;
             }
             else
             {
             partyTradeIdentifier.Add(new PartyTradeIdentifier(item));
             }
         }
     }
     
 
     XmlNodeList partyTradeInformationNodeList = xmlNode.SelectNodes("partyTradeInformation");
     
     foreach (XmlNode item in partyTradeInformationNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 partyTradeInformationIDRef = item.Attributes["id"].Name;
                 List<PartyTradeInformation> ob = new List<PartyTradeInformation>();
                 ob.Add(new PartyTradeInformation(item));
                 IDManager.SetID(partyTradeInformationIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 partyTradeInformationIDRef = item.Attributes["href"].Name;
             }
             else
             {
             partyTradeInformation.Add(new PartyTradeInformation(item));
             }
         }
     }
     
 
     XmlNodeList tradeDateNodeList = xmlNode.SelectNodes("tradeDate");
     if (tradeDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in tradeDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 tradeDateIDRef = item.Attributes["id"].Name;
                 IdentifiedDate ob = IdentifiedDate();
                 IDManager.SetID(tradeDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 tradeDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 tradeDate = new IdentifiedDate(item);
             }
         }
     }
     
 
     XmlNodeList clearedDateNodeList = xmlNode.SelectNodes("clearedDate");
     if (clearedDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in clearedDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 clearedDateIDRef = item.Attributes["id"].Name;
                 IdentifiedDate ob = IdentifiedDate();
                 IDManager.SetID(clearedDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 clearedDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 clearedDate = new IdentifiedDate(item);
             }
         }
     }
     
 
 }
 public DividendPeriod(XmlNode xmlNode)
 {
     XmlNode unadjustedStartDateNode = xmlNode.SelectSingleNode("unadjustedStartDate");
     
     if (unadjustedStartDateNode != null)
     {
         if (unadjustedStartDateNode.Attributes["href"] != null || unadjustedStartDateNode.Attributes["id"] != null) 
         {
             if (unadjustedStartDateNode.Attributes["id"] != null) 
             {
                 unadjustedStartDateIDRef_ = unadjustedStartDateNode.Attributes["id"].Value;
                 IdentifiedDate ob = new IdentifiedDate(unadjustedStartDateNode);
                 IDManager.SetID(unadjustedStartDateIDRef_, ob);
             }
             else if (unadjustedStartDateNode.Attributes["href"] != null)
             {
                 unadjustedStartDateIDRef_ = unadjustedStartDateNode.Attributes["href"].Value;
             }
             else
             {
                 unadjustedStartDate_ = new IdentifiedDate(unadjustedStartDateNode);
             }
         }
         else
         {
             unadjustedStartDate_ = new IdentifiedDate(unadjustedStartDateNode);
         }
     }
     
 
     XmlNode unadjustedEndDateNode = xmlNode.SelectSingleNode("unadjustedEndDate");
     
     if (unadjustedEndDateNode != null)
     {
         if (unadjustedEndDateNode.Attributes["href"] != null || unadjustedEndDateNode.Attributes["id"] != null) 
         {
             if (unadjustedEndDateNode.Attributes["id"] != null) 
             {
                 unadjustedEndDateIDRef_ = unadjustedEndDateNode.Attributes["id"].Value;
                 IdentifiedDate ob = new IdentifiedDate(unadjustedEndDateNode);
                 IDManager.SetID(unadjustedEndDateIDRef_, ob);
             }
             else if (unadjustedEndDateNode.Attributes["href"] != null)
             {
                 unadjustedEndDateIDRef_ = unadjustedEndDateNode.Attributes["href"].Value;
             }
             else
             {
                 unadjustedEndDate_ = new IdentifiedDate(unadjustedEndDateNode);
             }
         }
         else
         {
             unadjustedEndDate_ = new IdentifiedDate(unadjustedEndDateNode);
         }
     }
     
 
     XmlNode dateAdjustmentsNode = xmlNode.SelectSingleNode("dateAdjustments");
     
     if (dateAdjustmentsNode != null)
     {
         if (dateAdjustmentsNode.Attributes["href"] != null || dateAdjustmentsNode.Attributes["id"] != null) 
         {
             if (dateAdjustmentsNode.Attributes["id"] != null) 
             {
                 dateAdjustmentsIDRef_ = dateAdjustmentsNode.Attributes["id"].Value;
                 BusinessDayAdjustments ob = new BusinessDayAdjustments(dateAdjustmentsNode);
                 IDManager.SetID(dateAdjustmentsIDRef_, ob);
             }
             else if (dateAdjustmentsNode.Attributes["href"] != null)
             {
                 dateAdjustmentsIDRef_ = dateAdjustmentsNode.Attributes["href"].Value;
             }
             else
             {
                 dateAdjustments_ = new BusinessDayAdjustments(dateAdjustmentsNode);
             }
         }
         else
         {
             dateAdjustments_ = new BusinessDayAdjustments(dateAdjustmentsNode);
         }
     }
     
 
     XmlNode underlyerReferenceNode = xmlNode.SelectSingleNode("underlyerReference");
     
     if (underlyerReferenceNode != null)
     {
         if (underlyerReferenceNode.Attributes["href"] != null || underlyerReferenceNode.Attributes["id"] != null) 
         {
             if (underlyerReferenceNode.Attributes["id"] != null) 
             {
                 underlyerReferenceIDRef_ = underlyerReferenceNode.Attributes["id"].Value;
                 AssetReference ob = new AssetReference(underlyerReferenceNode);
                 IDManager.SetID(underlyerReferenceIDRef_, ob);
             }
             else if (underlyerReferenceNode.Attributes["href"] != null)
             {
                 underlyerReferenceIDRef_ = underlyerReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 underlyerReference_ = new AssetReference(underlyerReferenceNode);
             }
         }
         else
         {
             underlyerReference_ = new AssetReference(underlyerReferenceNode);
         }
     }
     
 
 }
Exemple #38
0
        public PricingStructureValuation(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNodeList baseDateNodeList = xmlNode.SelectNodes("baseDate");

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

            foreach (XmlNode item in baseDateNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        baseDateIDRef = item.Attributes["id"].Name;
                        IdentifiedDate ob = IdentifiedDate();
                        IDManager.SetID(baseDateIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        baseDateIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        baseDate = new IdentifiedDate(item);
                    }
                }
            }


            XmlNodeList spotDateNodeList = xmlNode.SelectNodes("spotDate");

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

            foreach (XmlNode item in spotDateNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        spotDateIDRef = item.Attributes["id"].Name;
                        IdentifiedDate ob = IdentifiedDate();
                        IDManager.SetID(spotDateIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        spotDateIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        spotDate = new IdentifiedDate(item);
                    }
                }
            }


            XmlNodeList inputDataDateNodeList = xmlNode.SelectNodes("inputDataDate");

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

            foreach (XmlNode item in inputDataDateNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        inputDataDateIDRef = item.Attributes["id"].Name;
                        IdentifiedDate ob = IdentifiedDate();
                        IDManager.SetID(inputDataDateIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        inputDataDateIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        inputDataDate = new IdentifiedDate(item);
                    }
                }
            }


            XmlNodeList endDateNodeList = xmlNode.SelectNodes("endDate");

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

            foreach (XmlNode item in endDateNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        endDateIDRef = item.Attributes["id"].Name;
                        IdentifiedDate ob = IdentifiedDate();
                        IDManager.SetID(endDateIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        endDateIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        endDate = new IdentifiedDate(item);
                    }
                }
            }


            XmlNodeList buildDateTimeNodeList = xmlNode.SelectNodes("buildDateTime");

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

            foreach (XmlNode item in buildDateTimeNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        buildDateTimeIDRef = item.Attributes["id"].Name;
                        XsdTypeDateTime ob = XsdTypeDateTime();
                        IDManager.SetID(buildDateTimeIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        buildDateTimeIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        buildDateTime = new XsdTypeDateTime(item);
                    }
                }
            }
        }
 public TradeHeader(XmlNode xmlNode)
 {
     XmlNodeList partyTradeIdentifierNodeList = xmlNode.SelectNodes("partyTradeIdentifier");
     
     if (partyTradeIdentifierNodeList != null)
     {
         this.partyTradeIdentifier_ = new List<PartyTradeIdentifier>();
         foreach (XmlNode item in partyTradeIdentifierNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     partyTradeIdentifierIDRef_ = item.Attributes["id"].Value;
                     partyTradeIdentifier_.Add(new PartyTradeIdentifier(item));
                     IDManager.SetID(partyTradeIdentifierIDRef_, partyTradeIdentifier_[partyTradeIdentifier_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     partyTradeIdentifierIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 partyTradeIdentifier_.Add(new PartyTradeIdentifier(item));
                 }
             }
             else
             {
                 partyTradeIdentifier_.Add(new PartyTradeIdentifier(item));
             }
         }
     }
     
 
     XmlNodeList partyTradeInformationNodeList = xmlNode.SelectNodes("partyTradeInformation");
     
     if (partyTradeInformationNodeList != null)
     {
         this.partyTradeInformation_ = new List<PartyTradeInformation>();
         foreach (XmlNode item in partyTradeInformationNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     partyTradeInformationIDRef_ = item.Attributes["id"].Value;
                     partyTradeInformation_.Add(new PartyTradeInformation(item));
                     IDManager.SetID(partyTradeInformationIDRef_, partyTradeInformation_[partyTradeInformation_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     partyTradeInformationIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 partyTradeInformation_.Add(new PartyTradeInformation(item));
                 }
             }
             else
             {
                 partyTradeInformation_.Add(new PartyTradeInformation(item));
             }
         }
     }
     
 
     XmlNode tradeDateNode = xmlNode.SelectSingleNode("tradeDate");
     
     if (tradeDateNode != null)
     {
         if (tradeDateNode.Attributes["href"] != null || tradeDateNode.Attributes["id"] != null) 
         {
             if (tradeDateNode.Attributes["id"] != null) 
             {
                 tradeDateIDRef_ = tradeDateNode.Attributes["id"].Value;
                 IdentifiedDate ob = new IdentifiedDate(tradeDateNode);
                 IDManager.SetID(tradeDateIDRef_, ob);
             }
             else if (tradeDateNode.Attributes["href"] != null)
             {
                 tradeDateIDRef_ = tradeDateNode.Attributes["href"].Value;
             }
             else
             {
                 tradeDate_ = new IdentifiedDate(tradeDateNode);
             }
         }
         else
         {
             tradeDate_ = new IdentifiedDate(tradeDateNode);
         }
     }
     
 
     XmlNode clearedDateNode = xmlNode.SelectSingleNode("clearedDate");
     
     if (clearedDateNode != null)
     {
         if (clearedDateNode.Attributes["href"] != null || clearedDateNode.Attributes["id"] != null) 
         {
             if (clearedDateNode.Attributes["id"] != null) 
             {
                 clearedDateIDRef_ = clearedDateNode.Attributes["id"].Value;
                 IdentifiedDate ob = new IdentifiedDate(clearedDateNode);
                 IDManager.SetID(clearedDateIDRef_, ob);
             }
             else if (clearedDateNode.Attributes["href"] != null)
             {
                 clearedDateIDRef_ = clearedDateNode.Attributes["href"].Value;
             }
             else
             {
                 clearedDate_ = new IdentifiedDate(clearedDateNode);
             }
         }
         else
         {
             clearedDate_ = new IdentifiedDate(clearedDateNode);
         }
     }
     
 
 }
Exemple #40
0
        public DerivedValuationScenario(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 baseValuationScenarioNode = xmlNode.SelectSingleNode("baseValuationScenario");

            if (baseValuationScenarioNode != null)
            {
                if (baseValuationScenarioNode.Attributes["href"] != null || baseValuationScenarioNode.Attributes["id"] != null)
                {
                    if (baseValuationScenarioNode.Attributes["id"] != null)
                    {
                        baseValuationScenarioIDRef_ = baseValuationScenarioNode.Attributes["id"].Value;
                        ValuationScenarioReference ob = new ValuationScenarioReference(baseValuationScenarioNode);
                        IDManager.SetID(baseValuationScenarioIDRef_, ob);
                    }
                    else if (baseValuationScenarioNode.Attributes["href"] != null)
                    {
                        baseValuationScenarioIDRef_ = baseValuationScenarioNode.Attributes["href"].Value;
                    }
                    else
                    {
                        baseValuationScenario_ = new ValuationScenarioReference(baseValuationScenarioNode);
                    }
                }
                else
                {
                    baseValuationScenario_ = new ValuationScenarioReference(baseValuationScenarioNode);
                }
            }


            XmlNode valuationDateNode = xmlNode.SelectSingleNode("valuationDate");

            if (valuationDateNode != null)
            {
                if (valuationDateNode.Attributes["href"] != null || valuationDateNode.Attributes["id"] != null)
                {
                    if (valuationDateNode.Attributes["id"] != null)
                    {
                        valuationDateIDRef_ = valuationDateNode.Attributes["id"].Value;
                        IdentifiedDate ob = new IdentifiedDate(valuationDateNode);
                        IDManager.SetID(valuationDateIDRef_, ob);
                    }
                    else if (valuationDateNode.Attributes["href"] != null)
                    {
                        valuationDateIDRef_ = valuationDateNode.Attributes["href"].Value;
                    }
                    else
                    {
                        valuationDate_ = new IdentifiedDate(valuationDateNode);
                    }
                }
                else
                {
                    valuationDate_ = new IdentifiedDate(valuationDateNode);
                }
            }


            XmlNode marketReferenceNode = xmlNode.SelectSingleNode("marketReference");

            if (marketReferenceNode != null)
            {
                if (marketReferenceNode.Attributes["href"] != null || marketReferenceNode.Attributes["id"] != null)
                {
                    if (marketReferenceNode.Attributes["id"] != null)
                    {
                        marketReferenceIDRef_ = marketReferenceNode.Attributes["id"].Value;
                        MarketReference ob = new MarketReference(marketReferenceNode);
                        IDManager.SetID(marketReferenceIDRef_, ob);
                    }
                    else if (marketReferenceNode.Attributes["href"] != null)
                    {
                        marketReferenceIDRef_ = marketReferenceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        marketReference_ = new MarketReference(marketReferenceNode);
                    }
                }
                else
                {
                    marketReference_ = new MarketReference(marketReferenceNode);
                }
            }


            XmlNodeList shiftNodeList = xmlNode.SelectNodes("shift");

            if (shiftNodeList != null)
            {
                this.shift_ = new List <PricingParameterShift>();
                foreach (XmlNode item in shiftNodeList)
                {
                    if (item.Attributes["href"] != null || item.Attributes["id"] != null)
                    {
                        if (item.Attributes["id"] != null)
                        {
                            shiftIDRef_ = item.Attributes["id"].Value;
                            shift_.Add(new PricingParameterShift(item));
                            IDManager.SetID(shiftIDRef_, shift_[shift_.Count - 1]);
                        }
                        else if (item.Attributes["href"] != null)
                        {
                            shiftIDRef_ = item.Attributes["href"].Value;
                        }
                        else
                        {
                            shift_.Add(new PricingParameterShift(item));
                        }
                    }
                    else
                    {
                        shift_.Add(new PricingParameterShift(item));
                    }
                }
            }
        }
 public DerivedValuationScenario(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 baseValuationScenarioNodeList = xmlNode.SelectNodes("baseValuationScenario");
     if (baseValuationScenarioNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in baseValuationScenarioNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 baseValuationScenarioIDRef = item.Attributes["id"].Name;
                 ValuationScenarioReference ob = ValuationScenarioReference();
                 IDManager.SetID(baseValuationScenarioIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 baseValuationScenarioIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 baseValuationScenario = new ValuationScenarioReference(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));
             }
         }
     }
     
 
 }