public SensitivitySet(XmlNode xmlNode)
        {
            XmlNodeList nameNodeList = xmlNode.SelectNodes("name");

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

            foreach (XmlNode item in nameNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        nameIDRef = item.Attributes["id"].Name;
                        XsdTypeString ob = XsdTypeString();
                        IDManager.SetID(nameIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        nameIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        name = new XsdTypeString(item);
                    }
                }
            }


            XmlNodeList definitionReferenceNodeList = xmlNode.SelectNodes("definitionReference");

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

            foreach (XmlNode item in definitionReferenceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        definitionReferenceIDRef = item.Attributes["id"].Name;
                        SensitivitySetDefinitionReference ob = SensitivitySetDefinitionReference();
                        IDManager.SetID(definitionReferenceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        definitionReferenceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        definitionReference = new SensitivitySetDefinitionReference(item);
                    }
                }
            }


            XmlNodeList sensitivityNodeList = xmlNode.SelectNodes("sensitivity");

            foreach (XmlNode item in sensitivityNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        sensitivityIDRef = item.Attributes["id"].Name;
                        List <Sensitivity> ob = new List <Sensitivity>();
                        ob.Add(new Sensitivity(item));
                        IDManager.SetID(sensitivityIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        sensitivityIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        sensitivity.Add(new Sensitivity(item));
                    }
                }
            }
        }
Exemplo n.º 2
0
        public SensitivitySet(XmlNode xmlNode)
        {
            XmlNode nameNode = xmlNode.SelectSingleNode("name");

            if (nameNode != null)
            {
                if (nameNode.Attributes["href"] != null || nameNode.Attributes["id"] != null)
                {
                    if (nameNode.Attributes["id"] != null)
                    {
                        nameIDRef_ = nameNode.Attributes["id"].Value;
                        XsdTypeString ob = new XsdTypeString(nameNode);
                        IDManager.SetID(nameIDRef_, ob);
                    }
                    else if (nameNode.Attributes["href"] != null)
                    {
                        nameIDRef_ = nameNode.Attributes["href"].Value;
                    }
                    else
                    {
                        name_ = new XsdTypeString(nameNode);
                    }
                }
                else
                {
                    name_ = new XsdTypeString(nameNode);
                }
            }


            XmlNode definitionReferenceNode = xmlNode.SelectSingleNode("definitionReference");

            if (definitionReferenceNode != null)
            {
                if (definitionReferenceNode.Attributes["href"] != null || definitionReferenceNode.Attributes["id"] != null)
                {
                    if (definitionReferenceNode.Attributes["id"] != null)
                    {
                        definitionReferenceIDRef_ = definitionReferenceNode.Attributes["id"].Value;
                        SensitivitySetDefinitionReference ob = new SensitivitySetDefinitionReference(definitionReferenceNode);
                        IDManager.SetID(definitionReferenceIDRef_, ob);
                    }
                    else if (definitionReferenceNode.Attributes["href"] != null)
                    {
                        definitionReferenceIDRef_ = definitionReferenceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        definitionReference_ = new SensitivitySetDefinitionReference(definitionReferenceNode);
                    }
                }
                else
                {
                    definitionReference_ = new SensitivitySetDefinitionReference(definitionReferenceNode);
                }
            }


            XmlNodeList sensitivityNodeList = xmlNode.SelectNodes("sensitivity");

            if (sensitivityNodeList != null)
            {
                this.sensitivity_ = new List <Sensitivity>();
                foreach (XmlNode item in sensitivityNodeList)
                {
                    if (item.Attributes["href"] != null || item.Attributes["id"] != null)
                    {
                        if (item.Attributes["id"] != null)
                        {
                            sensitivityIDRef_ = item.Attributes["id"].Value;
                            sensitivity_.Add(new Sensitivity(item));
                            IDManager.SetID(sensitivityIDRef_, sensitivity_[sensitivity_.Count - 1]);
                        }
                        else if (item.Attributes["href"] != null)
                        {
                            sensitivityIDRef_ = item.Attributes["href"].Value;
                        }
                        else
                        {
                            sensitivity_.Add(new Sensitivity(item));
                        }
                    }
                    else
                    {
                        sensitivity_.Add(new Sensitivity(item));
                    }
                }
            }
        }
 public SensitivitySet(XmlNode xmlNode)
 {
     XmlNode nameNode = xmlNode.SelectSingleNode("name");
     
     if (nameNode != null)
     {
         if (nameNode.Attributes["href"] != null || nameNode.Attributes["id"] != null) 
         {
             if (nameNode.Attributes["id"] != null) 
             {
                 nameIDRef_ = nameNode.Attributes["id"].Value;
                 XsdTypeString ob = new XsdTypeString(nameNode);
                 IDManager.SetID(nameIDRef_, ob);
             }
             else if (nameNode.Attributes["href"] != null)
             {
                 nameIDRef_ = nameNode.Attributes["href"].Value;
             }
             else
             {
                 name_ = new XsdTypeString(nameNode);
             }
         }
         else
         {
             name_ = new XsdTypeString(nameNode);
         }
     }
     
 
     XmlNode definitionReferenceNode = xmlNode.SelectSingleNode("definitionReference");
     
     if (definitionReferenceNode != null)
     {
         if (definitionReferenceNode.Attributes["href"] != null || definitionReferenceNode.Attributes["id"] != null) 
         {
             if (definitionReferenceNode.Attributes["id"] != null) 
             {
                 definitionReferenceIDRef_ = definitionReferenceNode.Attributes["id"].Value;
                 SensitivitySetDefinitionReference ob = new SensitivitySetDefinitionReference(definitionReferenceNode);
                 IDManager.SetID(definitionReferenceIDRef_, ob);
             }
             else if (definitionReferenceNode.Attributes["href"] != null)
             {
                 definitionReferenceIDRef_ = definitionReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 definitionReference_ = new SensitivitySetDefinitionReference(definitionReferenceNode);
             }
         }
         else
         {
             definitionReference_ = new SensitivitySetDefinitionReference(definitionReferenceNode);
         }
     }
     
 
     XmlNodeList sensitivityNodeList = xmlNode.SelectNodes("sensitivity");
     
     if (sensitivityNodeList != null)
     {
         this.sensitivity_ = new List<Sensitivity>();
         foreach (XmlNode item in sensitivityNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     sensitivityIDRef_ = item.Attributes["id"].Value;
                     sensitivity_.Add(new Sensitivity(item));
                     IDManager.SetID(sensitivityIDRef_, sensitivity_[sensitivity_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     sensitivityIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 sensitivity_.Add(new Sensitivity(item));
                 }
             }
             else
             {
                 sensitivity_.Add(new Sensitivity(item));
             }
         }
     }
     
 
 }
 public SensitivitySet(XmlNode xmlNode)
 {
     XmlNodeList nameNodeList = xmlNode.SelectNodes("name");
     if (nameNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in nameNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 nameIDRef = item.Attributes["id"].Name;
                 XsdTypeString ob = XsdTypeString();
                 IDManager.SetID(nameIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 nameIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 name = new XsdTypeString(item);
             }
         }
     }
     
 
     XmlNodeList definitionReferenceNodeList = xmlNode.SelectNodes("definitionReference");
     if (definitionReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in definitionReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 definitionReferenceIDRef = item.Attributes["id"].Name;
                 SensitivitySetDefinitionReference ob = SensitivitySetDefinitionReference();
                 IDManager.SetID(definitionReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 definitionReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 definitionReference = new SensitivitySetDefinitionReference(item);
             }
         }
     }
     
 
     XmlNodeList sensitivityNodeList = xmlNode.SelectNodes("sensitivity");
     
     foreach (XmlNode item in sensitivityNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 sensitivityIDRef = item.Attributes["id"].Name;
                 List<Sensitivity> ob = new List<Sensitivity>();
                 ob.Add(new Sensitivity(item));
                 IDManager.SetID(sensitivityIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 sensitivityIDRef = item.Attributes["href"].Name;
             }
             else
             {
             sensitivity.Add(new Sensitivity(item));
             }
         }
     }
     
 
 }