public RelatedBusinessUnit(XmlNode xmlNode)
 {
     XmlNodeList businessUnitReferenceNodeList = xmlNode.SelectNodes("businessUnitReference");
     if (businessUnitReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in businessUnitReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 businessUnitReferenceIDRef = item.Attributes["id"].Name;
                 BusinessUnitReference ob = BusinessUnitReference();
                 IDManager.SetID(businessUnitReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 businessUnitReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 businessUnitReference = new BusinessUnitReference(item);
             }
         }
     }
     
 
     XmlNodeList roleNodeList = xmlNode.SelectNodes("role");
     if (roleNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in roleNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 roleIDRef = item.Attributes["id"].Name;
                 BusinessUnitRole ob = BusinessUnitRole();
                 IDManager.SetID(roleIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 roleIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 role = new BusinessUnitRole(item);
             }
         }
     }
     
 
 }
Esempio n. 2
0
        public RelatedBusinessUnit(XmlNode xmlNode)
        {
            XmlNodeList businessUnitReferenceNodeList = xmlNode.SelectNodes("businessUnitReference");

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

            foreach (XmlNode item in businessUnitReferenceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        businessUnitReferenceIDRef = item.Attributes["id"].Name;
                        BusinessUnitReference ob = BusinessUnitReference();
                        IDManager.SetID(businessUnitReferenceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        businessUnitReferenceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        businessUnitReference = new BusinessUnitReference(item);
                    }
                }
            }


            XmlNodeList roleNodeList = xmlNode.SelectNodes("role");

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

            foreach (XmlNode item in roleNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        roleIDRef = item.Attributes["id"].Name;
                        BusinessUnitRole ob = BusinessUnitRole();
                        IDManager.SetID(roleIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        roleIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        role = new BusinessUnitRole(item);
                    }
                }
            }
        }
 public RelatedBusinessUnit(XmlNode xmlNode)
 {
     XmlNode businessUnitReferenceNode = xmlNode.SelectSingleNode("businessUnitReference");
     
     if (businessUnitReferenceNode != null)
     {
         if (businessUnitReferenceNode.Attributes["href"] != null || businessUnitReferenceNode.Attributes["id"] != null) 
         {
             if (businessUnitReferenceNode.Attributes["id"] != null) 
             {
                 businessUnitReferenceIDRef_ = businessUnitReferenceNode.Attributes["id"].Value;
                 BusinessUnitReference ob = new BusinessUnitReference(businessUnitReferenceNode);
                 IDManager.SetID(businessUnitReferenceIDRef_, ob);
             }
             else if (businessUnitReferenceNode.Attributes["href"] != null)
             {
                 businessUnitReferenceIDRef_ = businessUnitReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 businessUnitReference_ = new BusinessUnitReference(businessUnitReferenceNode);
             }
         }
         else
         {
             businessUnitReference_ = new BusinessUnitReference(businessUnitReferenceNode);
         }
     }
     
 
     XmlNode roleNode = xmlNode.SelectSingleNode("role");
     
     if (roleNode != null)
     {
         if (roleNode.Attributes["href"] != null || roleNode.Attributes["id"] != null) 
         {
             if (roleNode.Attributes["id"] != null) 
             {
                 roleIDRef_ = roleNode.Attributes["id"].Value;
                 BusinessUnitRole ob = new BusinessUnitRole(roleNode);
                 IDManager.SetID(roleIDRef_, ob);
             }
             else if (roleNode.Attributes["href"] != null)
             {
                 roleIDRef_ = roleNode.Attributes["href"].Value;
             }
             else
             {
                 role_ = new BusinessUnitRole(roleNode);
             }
         }
         else
         {
             role_ = new BusinessUnitRole(roleNode);
         }
     }
     
 
 }
        public RelatedBusinessUnit(XmlNode xmlNode)
        {
            XmlNode businessUnitReferenceNode = xmlNode.SelectSingleNode("businessUnitReference");

            if (businessUnitReferenceNode != null)
            {
                if (businessUnitReferenceNode.Attributes["href"] != null || businessUnitReferenceNode.Attributes["id"] != null)
                {
                    if (businessUnitReferenceNode.Attributes["id"] != null)
                    {
                        businessUnitReferenceIDRef_ = businessUnitReferenceNode.Attributes["id"].Value;
                        BusinessUnitReference ob = new BusinessUnitReference(businessUnitReferenceNode);
                        IDManager.SetID(businessUnitReferenceIDRef_, ob);
                    }
                    else if (businessUnitReferenceNode.Attributes["href"] != null)
                    {
                        businessUnitReferenceIDRef_ = businessUnitReferenceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        businessUnitReference_ = new BusinessUnitReference(businessUnitReferenceNode);
                    }
                }
                else
                {
                    businessUnitReference_ = new BusinessUnitReference(businessUnitReferenceNode);
                }
            }


            XmlNode roleNode = xmlNode.SelectSingleNode("role");

            if (roleNode != null)
            {
                if (roleNode.Attributes["href"] != null || roleNode.Attributes["id"] != null)
                {
                    if (roleNode.Attributes["id"] != null)
                    {
                        roleIDRef_ = roleNode.Attributes["id"].Value;
                        BusinessUnitRole ob = new BusinessUnitRole(roleNode);
                        IDManager.SetID(roleIDRef_, ob);
                    }
                    else if (roleNode.Attributes["href"] != null)
                    {
                        roleIDRef_ = roleNode.Attributes["href"].Value;
                    }
                    else
                    {
                        role_ = new BusinessUnitRole(roleNode);
                    }
                }
                else
                {
                    role_ = new BusinessUnitRole(roleNode);
                }
            }
        }
 public Person(XmlNode xmlNode)
 {
     XmlNodeList honorificNodeList = xmlNode.SelectNodes("honorific");
     if (honorificNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in honorificNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 honorificIDRef = item.Attributes["id"].Name;
                 XsdTypeNormalizedString ob = XsdTypeNormalizedString();
                 IDManager.SetID(honorificIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 honorificIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 honorific = new XsdTypeNormalizedString(item);
             }
         }
     }
     
 
     XmlNodeList firstNameNodeList = xmlNode.SelectNodes("firstName");
     if (firstNameNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in firstNameNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 firstNameIDRef = item.Attributes["id"].Name;
                 XsdTypeNormalizedString ob = XsdTypeNormalizedString();
                 IDManager.SetID(firstNameIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 firstNameIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 firstName = new XsdTypeNormalizedString(item);
             }
         }
     }
     
 
     XmlNodeList middleNameNodeList = xmlNode.SelectNodes("middleName");
     
     foreach (XmlNode item in middleNameNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 middleNameIDRef = item.Attributes["id"].Name;
                 XsdTypeNormalizedString ob = new XsdTypeNormalizedString();
                 ob.Add(new XsdTypeNormalizedString(item));
                 IDManager.SetID(middleNameIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 middleNameIDRef = item.Attributes["href"].Name;
             }
             else
             {
             middleName.Add(new XsdTypeNormalizedString(item));
             }
         }
     }
     
 
     XmlNodeList initialNodeList = xmlNode.SelectNodes("initial");
     
     foreach (XmlNode item in initialNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 initialIDRef = item.Attributes["id"].Name;
                 List<Initial> ob = new List<Initial>();
                 ob.Add(new Initial(item));
                 IDManager.SetID(initialIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 initialIDRef = item.Attributes["href"].Name;
             }
             else
             {
             initial.Add(new Initial(item));
             }
         }
     }
     
 
     XmlNodeList surnameNodeList = xmlNode.SelectNodes("surname");
     if (surnameNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in surnameNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 surnameIDRef = item.Attributes["id"].Name;
                 XsdTypeNormalizedString ob = XsdTypeNormalizedString();
                 IDManager.SetID(surnameIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 surnameIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 surname = new XsdTypeNormalizedString(item);
             }
         }
     }
     
 
     XmlNodeList suffixNodeList = xmlNode.SelectNodes("suffix");
     if (suffixNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in suffixNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 suffixIDRef = item.Attributes["id"].Name;
                 XsdTypeNormalizedString ob = XsdTypeNormalizedString();
                 IDManager.SetID(suffixIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 suffixIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 suffix = new XsdTypeNormalizedString(item);
             }
         }
     }
     
 
     XmlNodeList personIdNodeList = xmlNode.SelectNodes("personId");
     
     foreach (XmlNode item in personIdNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 personIdIDRef = item.Attributes["id"].Name;
                 List<PersonId> ob = new List<PersonId>();
                 ob.Add(new PersonId(item));
                 IDManager.SetID(personIdIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 personIdIDRef = item.Attributes["href"].Name;
             }
             else
             {
             personId.Add(new PersonId(item));
             }
         }
     }
     
 
     XmlNodeList businessUnitReferenceNodeList = xmlNode.SelectNodes("businessUnitReference");
     if (businessUnitReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in businessUnitReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 businessUnitReferenceIDRef = item.Attributes["id"].Name;
                 BusinessUnitReference ob = BusinessUnitReference();
                 IDManager.SetID(businessUnitReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 businessUnitReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 businessUnitReference = new BusinessUnitReference(item);
             }
         }
     }
     
 
     XmlNodeList contactInfoNodeList = xmlNode.SelectNodes("contactInfo");
     if (contactInfoNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in contactInfoNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 contactInfoIDRef = item.Attributes["id"].Name;
                 ContactInformation ob = ContactInformation();
                 IDManager.SetID(contactInfoIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 contactInfoIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 contactInfo = new ContactInformation(item);
             }
         }
     }
     
 
     XmlNodeList countryNodeList = xmlNode.SelectNodes("country");
     if (countryNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in countryNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 countryIDRef = item.Attributes["id"].Name;
                 CountryCode ob = CountryCode();
                 IDManager.SetID(countryIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 countryIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 country = new CountryCode(item);
             }
         }
     }
     
 
 }
Esempio n. 6
0
        public Person(XmlNode xmlNode)
        {
            XmlNodeList honorificNodeList = xmlNode.SelectNodes("honorific");

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

            foreach (XmlNode item in honorificNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        honorificIDRef = item.Attributes["id"].Name;
                        XsdTypeNormalizedString ob = XsdTypeNormalizedString();
                        IDManager.SetID(honorificIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        honorificIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        honorific = new XsdTypeNormalizedString(item);
                    }
                }
            }


            XmlNodeList firstNameNodeList = xmlNode.SelectNodes("firstName");

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

            foreach (XmlNode item in firstNameNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        firstNameIDRef = item.Attributes["id"].Name;
                        XsdTypeNormalizedString ob = XsdTypeNormalizedString();
                        IDManager.SetID(firstNameIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        firstNameIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        firstName = new XsdTypeNormalizedString(item);
                    }
                }
            }


            XmlNodeList middleNameNodeList = xmlNode.SelectNodes("middleName");

            foreach (XmlNode item in middleNameNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        middleNameIDRef = item.Attributes["id"].Name;
                        XsdTypeNormalizedString ob = new XsdTypeNormalizedString();
                        ob.Add(new XsdTypeNormalizedString(item));
                        IDManager.SetID(middleNameIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        middleNameIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        middleName.Add(new XsdTypeNormalizedString(item));
                    }
                }
            }


            XmlNodeList initialNodeList = xmlNode.SelectNodes("initial");

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


            XmlNodeList surnameNodeList = xmlNode.SelectNodes("surname");

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

            foreach (XmlNode item in surnameNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        surnameIDRef = item.Attributes["id"].Name;
                        XsdTypeNormalizedString ob = XsdTypeNormalizedString();
                        IDManager.SetID(surnameIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        surnameIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        surname = new XsdTypeNormalizedString(item);
                    }
                }
            }


            XmlNodeList suffixNodeList = xmlNode.SelectNodes("suffix");

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

            foreach (XmlNode item in suffixNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        suffixIDRef = item.Attributes["id"].Name;
                        XsdTypeNormalizedString ob = XsdTypeNormalizedString();
                        IDManager.SetID(suffixIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        suffixIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        suffix = new XsdTypeNormalizedString(item);
                    }
                }
            }


            XmlNodeList personIdNodeList = xmlNode.SelectNodes("personId");

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


            XmlNodeList businessUnitReferenceNodeList = xmlNode.SelectNodes("businessUnitReference");

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

            foreach (XmlNode item in businessUnitReferenceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        businessUnitReferenceIDRef = item.Attributes["id"].Name;
                        BusinessUnitReference ob = BusinessUnitReference();
                        IDManager.SetID(businessUnitReferenceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        businessUnitReferenceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        businessUnitReference = new BusinessUnitReference(item);
                    }
                }
            }


            XmlNodeList contactInfoNodeList = xmlNode.SelectNodes("contactInfo");

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

            foreach (XmlNode item in contactInfoNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        contactInfoIDRef = item.Attributes["id"].Name;
                        ContactInformation ob = ContactInformation();
                        IDManager.SetID(contactInfoIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        contactInfoIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        contactInfo = new ContactInformation(item);
                    }
                }
            }


            XmlNodeList countryNodeList = xmlNode.SelectNodes("country");

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

            foreach (XmlNode item in countryNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        countryIDRef = item.Attributes["id"].Name;
                        CountryCode ob = CountryCode();
                        IDManager.SetID(countryIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        countryIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        country = new CountryCode(item);
                    }
                }
            }
        }
 public Person(XmlNode xmlNode)
 {
     XmlNode honorificNode = xmlNode.SelectSingleNode("honorific");
     
     if (honorificNode != null)
     {
         if (honorificNode.Attributes["href"] != null || honorificNode.Attributes["id"] != null) 
         {
             if (honorificNode.Attributes["id"] != null) 
             {
                 honorificIDRef_ = honorificNode.Attributes["id"].Value;
                 XsdTypeNormalizedString ob = new XsdTypeNormalizedString(honorificNode);
                 IDManager.SetID(honorificIDRef_, ob);
             }
             else if (honorificNode.Attributes["href"] != null)
             {
                 honorificIDRef_ = honorificNode.Attributes["href"].Value;
             }
             else
             {
                 honorific_ = new XsdTypeNormalizedString(honorificNode);
             }
         }
         else
         {
             honorific_ = new XsdTypeNormalizedString(honorificNode);
         }
     }
     
 
     XmlNode firstNameNode = xmlNode.SelectSingleNode("firstName");
     
     if (firstNameNode != null)
     {
         if (firstNameNode.Attributes["href"] != null || firstNameNode.Attributes["id"] != null) 
         {
             if (firstNameNode.Attributes["id"] != null) 
             {
                 firstNameIDRef_ = firstNameNode.Attributes["id"].Value;
                 XsdTypeNormalizedString ob = new XsdTypeNormalizedString(firstNameNode);
                 IDManager.SetID(firstNameIDRef_, ob);
             }
             else if (firstNameNode.Attributes["href"] != null)
             {
                 firstNameIDRef_ = firstNameNode.Attributes["href"].Value;
             }
             else
             {
                 firstName_ = new XsdTypeNormalizedString(firstNameNode);
             }
         }
         else
         {
             firstName_ = new XsdTypeNormalizedString(firstNameNode);
         }
     }
     
 
     XmlNodeList middleNameNodeList = xmlNode.SelectNodes("middleName");
     
     if (middleNameNodeList != null)
     {
         this.middleName_ = new List<XsdTypeNormalizedString>();
         foreach (XmlNode item in middleNameNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     middleNameIDRef_ = item.Attributes["id"].Value;
                     middleName_.Add(new XsdTypeNormalizedString(item));
                     IDManager.SetID(middleNameIDRef_, middleName_[middleName_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     middleNameIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 middleName_.Add(new XsdTypeNormalizedString(item));
                 }
             }
             else
             {
                 middleName_.Add(new XsdTypeNormalizedString(item));
             }
         }
     }
     
 
     XmlNodeList initialNodeList = xmlNode.SelectNodes("initial");
     
     if (initialNodeList != null)
     {
         this.initial_ = new List<Initial>();
         foreach (XmlNode item in initialNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     initialIDRef_ = item.Attributes["id"].Value;
                     initial_.Add(new Initial(item));
                     IDManager.SetID(initialIDRef_, initial_[initial_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     initialIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 initial_.Add(new Initial(item));
                 }
             }
             else
             {
                 initial_.Add(new Initial(item));
             }
         }
     }
     
 
     XmlNode surnameNode = xmlNode.SelectSingleNode("surname");
     
     if (surnameNode != null)
     {
         if (surnameNode.Attributes["href"] != null || surnameNode.Attributes["id"] != null) 
         {
             if (surnameNode.Attributes["id"] != null) 
             {
                 surnameIDRef_ = surnameNode.Attributes["id"].Value;
                 XsdTypeNormalizedString ob = new XsdTypeNormalizedString(surnameNode);
                 IDManager.SetID(surnameIDRef_, ob);
             }
             else if (surnameNode.Attributes["href"] != null)
             {
                 surnameIDRef_ = surnameNode.Attributes["href"].Value;
             }
             else
             {
                 surname_ = new XsdTypeNormalizedString(surnameNode);
             }
         }
         else
         {
             surname_ = new XsdTypeNormalizedString(surnameNode);
         }
     }
     
 
     XmlNode suffixNode = xmlNode.SelectSingleNode("suffix");
     
     if (suffixNode != null)
     {
         if (suffixNode.Attributes["href"] != null || suffixNode.Attributes["id"] != null) 
         {
             if (suffixNode.Attributes["id"] != null) 
             {
                 suffixIDRef_ = suffixNode.Attributes["id"].Value;
                 XsdTypeNormalizedString ob = new XsdTypeNormalizedString(suffixNode);
                 IDManager.SetID(suffixIDRef_, ob);
             }
             else if (suffixNode.Attributes["href"] != null)
             {
                 suffixIDRef_ = suffixNode.Attributes["href"].Value;
             }
             else
             {
                 suffix_ = new XsdTypeNormalizedString(suffixNode);
             }
         }
         else
         {
             suffix_ = new XsdTypeNormalizedString(suffixNode);
         }
     }
     
 
     XmlNodeList personIdNodeList = xmlNode.SelectNodes("personId");
     
     if (personIdNodeList != null)
     {
         this.personId_ = new List<PersonId>();
         foreach (XmlNode item in personIdNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     personIdIDRef_ = item.Attributes["id"].Value;
                     personId_.Add(new PersonId(item));
                     IDManager.SetID(personIdIDRef_, personId_[personId_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     personIdIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 personId_.Add(new PersonId(item));
                 }
             }
             else
             {
                 personId_.Add(new PersonId(item));
             }
         }
     }
     
 
     XmlNode businessUnitReferenceNode = xmlNode.SelectSingleNode("businessUnitReference");
     
     if (businessUnitReferenceNode != null)
     {
         if (businessUnitReferenceNode.Attributes["href"] != null || businessUnitReferenceNode.Attributes["id"] != null) 
         {
             if (businessUnitReferenceNode.Attributes["id"] != null) 
             {
                 businessUnitReferenceIDRef_ = businessUnitReferenceNode.Attributes["id"].Value;
                 BusinessUnitReference ob = new BusinessUnitReference(businessUnitReferenceNode);
                 IDManager.SetID(businessUnitReferenceIDRef_, ob);
             }
             else if (businessUnitReferenceNode.Attributes["href"] != null)
             {
                 businessUnitReferenceIDRef_ = businessUnitReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 businessUnitReference_ = new BusinessUnitReference(businessUnitReferenceNode);
             }
         }
         else
         {
             businessUnitReference_ = new BusinessUnitReference(businessUnitReferenceNode);
         }
     }
     
 
     XmlNode contactInfoNode = xmlNode.SelectSingleNode("contactInfo");
     
     if (contactInfoNode != null)
     {
         if (contactInfoNode.Attributes["href"] != null || contactInfoNode.Attributes["id"] != null) 
         {
             if (contactInfoNode.Attributes["id"] != null) 
             {
                 contactInfoIDRef_ = contactInfoNode.Attributes["id"].Value;
                 ContactInformation ob = new ContactInformation(contactInfoNode);
                 IDManager.SetID(contactInfoIDRef_, ob);
             }
             else if (contactInfoNode.Attributes["href"] != null)
             {
                 contactInfoIDRef_ = contactInfoNode.Attributes["href"].Value;
             }
             else
             {
                 contactInfo_ = new ContactInformation(contactInfoNode);
             }
         }
         else
         {
             contactInfo_ = new ContactInformation(contactInfoNode);
         }
     }
     
 
     XmlNode countryNode = xmlNode.SelectSingleNode("country");
     
     if (countryNode != null)
     {
         if (countryNode.Attributes["href"] != null || countryNode.Attributes["id"] != null) 
         {
             if (countryNode.Attributes["id"] != null) 
             {
                 countryIDRef_ = countryNode.Attributes["id"].Value;
                 CountryCode ob = new CountryCode(countryNode);
                 IDManager.SetID(countryIDRef_, ob);
             }
             else if (countryNode.Attributes["href"] != null)
             {
                 countryIDRef_ = countryNode.Attributes["href"].Value;
             }
             else
             {
                 country_ = new CountryCode(countryNode);
             }
         }
         else
         {
             country_ = new CountryCode(countryNode);
         }
     }
     
 
 }
Esempio n. 8
0
        public Person(XmlNode xmlNode)
        {
            XmlNode honorificNode = xmlNode.SelectSingleNode("honorific");

            if (honorificNode != null)
            {
                if (honorificNode.Attributes["href"] != null || honorificNode.Attributes["id"] != null)
                {
                    if (honorificNode.Attributes["id"] != null)
                    {
                        honorificIDRef_ = honorificNode.Attributes["id"].Value;
                        XsdTypeNormalizedString ob = new XsdTypeNormalizedString(honorificNode);
                        IDManager.SetID(honorificIDRef_, ob);
                    }
                    else if (honorificNode.Attributes["href"] != null)
                    {
                        honorificIDRef_ = honorificNode.Attributes["href"].Value;
                    }
                    else
                    {
                        honorific_ = new XsdTypeNormalizedString(honorificNode);
                    }
                }
                else
                {
                    honorific_ = new XsdTypeNormalizedString(honorificNode);
                }
            }


            XmlNode firstNameNode = xmlNode.SelectSingleNode("firstName");

            if (firstNameNode != null)
            {
                if (firstNameNode.Attributes["href"] != null || firstNameNode.Attributes["id"] != null)
                {
                    if (firstNameNode.Attributes["id"] != null)
                    {
                        firstNameIDRef_ = firstNameNode.Attributes["id"].Value;
                        XsdTypeNormalizedString ob = new XsdTypeNormalizedString(firstNameNode);
                        IDManager.SetID(firstNameIDRef_, ob);
                    }
                    else if (firstNameNode.Attributes["href"] != null)
                    {
                        firstNameIDRef_ = firstNameNode.Attributes["href"].Value;
                    }
                    else
                    {
                        firstName_ = new XsdTypeNormalizedString(firstNameNode);
                    }
                }
                else
                {
                    firstName_ = new XsdTypeNormalizedString(firstNameNode);
                }
            }


            XmlNodeList middleNameNodeList = xmlNode.SelectNodes("middleName");

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


            XmlNodeList initialNodeList = xmlNode.SelectNodes("initial");

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


            XmlNode surnameNode = xmlNode.SelectSingleNode("surname");

            if (surnameNode != null)
            {
                if (surnameNode.Attributes["href"] != null || surnameNode.Attributes["id"] != null)
                {
                    if (surnameNode.Attributes["id"] != null)
                    {
                        surnameIDRef_ = surnameNode.Attributes["id"].Value;
                        XsdTypeNormalizedString ob = new XsdTypeNormalizedString(surnameNode);
                        IDManager.SetID(surnameIDRef_, ob);
                    }
                    else if (surnameNode.Attributes["href"] != null)
                    {
                        surnameIDRef_ = surnameNode.Attributes["href"].Value;
                    }
                    else
                    {
                        surname_ = new XsdTypeNormalizedString(surnameNode);
                    }
                }
                else
                {
                    surname_ = new XsdTypeNormalizedString(surnameNode);
                }
            }


            XmlNode suffixNode = xmlNode.SelectSingleNode("suffix");

            if (suffixNode != null)
            {
                if (suffixNode.Attributes["href"] != null || suffixNode.Attributes["id"] != null)
                {
                    if (suffixNode.Attributes["id"] != null)
                    {
                        suffixIDRef_ = suffixNode.Attributes["id"].Value;
                        XsdTypeNormalizedString ob = new XsdTypeNormalizedString(suffixNode);
                        IDManager.SetID(suffixIDRef_, ob);
                    }
                    else if (suffixNode.Attributes["href"] != null)
                    {
                        suffixIDRef_ = suffixNode.Attributes["href"].Value;
                    }
                    else
                    {
                        suffix_ = new XsdTypeNormalizedString(suffixNode);
                    }
                }
                else
                {
                    suffix_ = new XsdTypeNormalizedString(suffixNode);
                }
            }


            XmlNodeList personIdNodeList = xmlNode.SelectNodes("personId");

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


            XmlNode businessUnitReferenceNode = xmlNode.SelectSingleNode("businessUnitReference");

            if (businessUnitReferenceNode != null)
            {
                if (businessUnitReferenceNode.Attributes["href"] != null || businessUnitReferenceNode.Attributes["id"] != null)
                {
                    if (businessUnitReferenceNode.Attributes["id"] != null)
                    {
                        businessUnitReferenceIDRef_ = businessUnitReferenceNode.Attributes["id"].Value;
                        BusinessUnitReference ob = new BusinessUnitReference(businessUnitReferenceNode);
                        IDManager.SetID(businessUnitReferenceIDRef_, ob);
                    }
                    else if (businessUnitReferenceNode.Attributes["href"] != null)
                    {
                        businessUnitReferenceIDRef_ = businessUnitReferenceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        businessUnitReference_ = new BusinessUnitReference(businessUnitReferenceNode);
                    }
                }
                else
                {
                    businessUnitReference_ = new BusinessUnitReference(businessUnitReferenceNode);
                }
            }


            XmlNode contactInfoNode = xmlNode.SelectSingleNode("contactInfo");

            if (contactInfoNode != null)
            {
                if (contactInfoNode.Attributes["href"] != null || contactInfoNode.Attributes["id"] != null)
                {
                    if (contactInfoNode.Attributes["id"] != null)
                    {
                        contactInfoIDRef_ = contactInfoNode.Attributes["id"].Value;
                        ContactInformation ob = new ContactInformation(contactInfoNode);
                        IDManager.SetID(contactInfoIDRef_, ob);
                    }
                    else if (contactInfoNode.Attributes["href"] != null)
                    {
                        contactInfoIDRef_ = contactInfoNode.Attributes["href"].Value;
                    }
                    else
                    {
                        contactInfo_ = new ContactInformation(contactInfoNode);
                    }
                }
                else
                {
                    contactInfo_ = new ContactInformation(contactInfoNode);
                }
            }


            XmlNode countryNode = xmlNode.SelectSingleNode("country");

            if (countryNode != null)
            {
                if (countryNode.Attributes["href"] != null || countryNode.Attributes["id"] != null)
                {
                    if (countryNode.Attributes["id"] != null)
                    {
                        countryIDRef_ = countryNode.Attributes["id"].Value;
                        CountryCode ob = new CountryCode(countryNode);
                        IDManager.SetID(countryIDRef_, ob);
                    }
                    else if (countryNode.Attributes["href"] != null)
                    {
                        countryIDRef_ = countryNode.Attributes["href"].Value;
                    }
                    else
                    {
                        country_ = new CountryCode(countryNode);
                    }
                }
                else
                {
                    country_ = new CountryCode(countryNode);
                }
            }
        }