Пример #1
0
 internal void AddFioIdentity(Pullenti.Ner.Person.Internal.PersonMorphCollection lastName, Pullenti.Ner.Person.Internal.PersonMorphCollection firstName, object middleName)
 {
     if (lastName != null)
     {
         if (lastName.Number > 0)
         {
             string num = Pullenti.Ner.Core.NumberHelper.GetNumberRoman(lastName.Number);
             if (num == null)
             {
                 num = lastName.Number.ToString();
             }
             this.AddSlot(ATTR_NICKNAME, num, false, 0);
         }
         else
         {
             lastName.Correct();
             m_SurnameOccurs.Add(lastName);
             foreach (string v in lastName.Values)
             {
                 this.AddSlot(ATTR_LASTNAME, v, false, 0);
             }
         }
     }
     if (firstName != null)
     {
         firstName.Correct();
         if (firstName.Head != null && firstName.Head.Length > 2)
         {
             m_NameOccurs.Add(firstName);
         }
         foreach (string v in firstName.Values)
         {
             this.AddSlot(ATTR_FIRSTNAME, v, false, 0);
         }
         if (middleName is string)
         {
             this.AddSlot(ATTR_MIDDLENAME, middleName, false, 0);
         }
         else if (middleName is Pullenti.Ner.Person.Internal.PersonMorphCollection)
         {
             Pullenti.Ner.Person.Internal.PersonMorphCollection mm = middleName as Pullenti.Ner.Person.Internal.PersonMorphCollection;
             if (mm.Head != null && mm.Head.Length > 2)
             {
                 m_SecOccurs.Add(mm);
             }
             foreach (string v in mm.Values)
             {
                 this.AddSlot(ATTR_MIDDLENAME, v, false, 0);
             }
         }
     }
     this.CorrectData();
 }
Пример #2
0
 internal void AddIdentity(Pullenti.Ner.Person.Internal.PersonMorphCollection ident)
 {
     if (ident == null)
     {
         return;
     }
     m_IdentOccurs.Add(ident);
     foreach (string v in ident.Values)
     {
         this.AddSlot(ATTR_IDENTITY, v, false, 0);
     }
     this.CorrectData();
 }