Ejemplo n.º 1
0
        public override GEDCOMTag AddTag(string tagName, string tagValue, TagConstructor tagConstructor)
        {
            GEDCOMTag result;

            if (tagName == "NAME")
            {
                result = base.AddTag(tagName, tagValue, null);
            }
            else if (tagName == "_STARTDATE" || tagName == "_STOPDATE")
            {
                result = base.AddTag(tagName, tagValue, GEDCOMDate.Create);
            }
            else if (tagName == "_TASK")
            {
                result = fTasks.Add(new GEDCOMPointer(Owner, this, tagName, tagValue));
            }
            else if (tagName == "_COMM")
            {
                result = fCommunications.Add(new GEDCOMPointer(Owner, this, tagName, tagValue));
            }
            else if (tagName == "_GROUP")
            {
                result = fGroups.Add(new GEDCOMPointer(Owner, this, tagName, tagValue));
            }
            else
            {
                result = base.AddTag(tagName, tagValue, tagConstructor);
            }

            return(result);
        }
Ejemplo n.º 2
0
        public override GEDCOMTag AddTag(string tagName, string tagValue, TagConstructor tagConstructor)
        {
            GEDCOMTag result;

            if (tagName == "HUSB" || tagName == "WIFE")
            {
                result = base.AddTag(tagName, tagValue, GEDCOMPointer.Create);
            }
            else if (tagName == "CHIL")
            {
                result = fChildren.Add(new GEDCOMPointer(Owner, this, tagName, tagValue));
            }
            else
            {
                result = fTagsFactory.CreateTag(Owner, this, tagName, tagValue);

                if (result != null)
                {
                    if (result is GEDCOMFamilyEvent)
                    {
                        result = AddEvent(result as GEDCOMFamilyEvent);
                    }
                    else if (result is GEDCOMSpouseSealing)
                    {
                        result = fSpouseSealings.Add(result as GEDCOMSpouseSealing);
                    }
                }
                else
                {
                    result = base.AddTag(tagName, tagValue, tagConstructor);
                }
            }

            return(result);
        }
Ejemplo n.º 3
0
        public override GEDCOMTag AddTag(string tagName, string tagValue, TagConstructor tagConstructor)
        {
            GEDCOMTag result;

            if (tagName == "CHAN")
            {
                result = base.AddTag(tagName, tagValue, GEDCOMChangeDate.Create);
            }
            else if (tagName == "NOTE")
            {
                result = fNotes.Add(new GEDCOMNotes(Owner, this, tagName, tagValue));
            }
            else if (tagName == "SOUR")
            {
                result = fSourceCitations.Add(new GEDCOMSourceCitation(Owner, this, tagName, tagValue));
            }
            else if (tagName == "OBJE")
            {
                result = fMultimediaLinks.Add(new GEDCOMMultimediaLink(Owner, this, tagName, tagValue));
            }
            else if (tagName == "REFN")
            {
                result = fUserReferences.Add(new GEDCOMUserReference(Owner, this, tagName, tagValue));
            }
            else
            {
                result = base.AddTag(tagName, tagValue, tagConstructor);
            }

            return(result);
        }
Ejemplo n.º 4
0
 protected void AssignList(GEDCOMList <GEDCOMTag> srcList, GEDCOMList <GEDCOMTag> destList)
 {
     foreach (GEDCOMTag sourceTag in srcList)
     {
         GEDCOMTag copy = CreateCopy(sourceTag);
         destList.Add(copy);
     }
 }
Ejemplo n.º 5
0
 public GEDCOMPersonalName AddPersonalName(GEDCOMPersonalName value)
 {
     if (value != null)
     {
         value.SetLevel(Level + 1);
         fPersonalNames.Add(value);
     }
     return(value);
 }
Ejemplo n.º 6
0
        public override GEDCOMTag AddTag(string tagName, string tagValue, TagConstructor tagConstructor)
        {
            GEDCOMTag result;

            if (tagName == "NAME")
            {
                result = base.AddTag(tagName, tagValue, null);
            }
            else if (tagName == "_MEMBER")
            {
                result = fMembers.Add(new GEDCOMPointer(Owner, this, tagName, tagValue));
            }
            else
            {
                result = base.AddTag(tagName, tagValue, tagConstructor);
            }

            return(result);
        }
Ejemplo n.º 7
0
        public override GEDCOMTag AddTag(string tagName, string tagValue, TagConstructor tagConstructor)
        {
            GEDCOMTag result;

            if (tagName == "FILE")
            {
                result = fFileReferences.Add(new GEDCOMFileReference(Owner, this, tagName, tagValue));
            }
            else
            {
                result = base.AddTag(tagName, tagValue, tagConstructor);
            }

            return(result);
        }
Ejemplo n.º 8
0
        public override GEDCOMTag AddTag(string tagName, string tagValue, TagConstructor tagConstructor)
        {
            GEDCOMTag result;

            if (tagName == "REPO")
            {
                result = fRepositoryCitations.Add(new GEDCOMRepositoryCitation(Owner, this, tagName, tagValue));
            }
            else if (tagName == "DATA")
            {
                result = base.AddTag(tagName, tagValue, GEDCOMData.Create);
            }
            else
            {
                result = base.AddTag(tagName, tagValue, tagConstructor);
            }

            return(result);
        }
Ejemplo n.º 9
0
 public GEDCOMRecord AddRecord(GEDCOMRecord record)
 {
     fRecords.Add(record);
     XRefIndex_AddRecord(record);
     return(record);
 }
Ejemplo n.º 10
0
        public void AddWebPage(string value)
        {
            GEDCOMTag tag = fWWWList.Add(new GEDCOMTag(Owner, this, "WWW", value));

            tag.SetLevel(Level);
        }
Ejemplo n.º 11
0
        public void AddPhoneNumber(string value)
        {
            GEDCOMTag tag = fPhoneList.Add(new GEDCOMTag(Owner, this, "PHON", value));

            tag.SetLevel(Level);
        }
Ejemplo n.º 12
0
        public void AddFaxNumber(string value)
        {
            GEDCOMTag tag = fFaxList.Add(new GEDCOMTag(Owner, this, "FAX", value));

            tag.SetLevel(Level);
        }
Ejemplo n.º 13
0
        public void AddEmailAddress(string value)
        {
            GEDCOMTag tag = fEmailList.Add(new GEDCOMTag(Owner, this, "EMAIL", value));

            tag.SetLevel(Level);
        }
Ejemplo n.º 14
0
 protected GEDCOMTag InsertTag(GEDCOMTag tag)
 {
     fTags.Add(tag);
     return(tag);
 }
Ejemplo n.º 15
0
        public override GEDCOMTag AddTag(string tagName, string tagValue, TagConstructor tagConstructor)
        {
            GEDCOMTag result;

            if (tagName == "NAME")
            {
                result = AddPersonalName(new GEDCOMPersonalName(Owner, this, tagName, tagValue));
            }
            else if (tagName == "SUBM")
            {
                result = Submittors.Add(new GEDCOMPointer(Owner, this, tagName, tagValue));
            }
            else if (tagName == "ANCI")
            {
                result = AncestorsInterest.Add(new GEDCOMPointer(Owner, this, tagName, tagValue));
            }
            else if (tagName == "DESI")
            {
                result = DescendantsInterest.Add(new GEDCOMPointer(Owner, this, tagName, tagValue));
            }
            else if (tagName == "_GROUP")
            {
                result = fGroups.Add(new GEDCOMPointer(Owner, this, tagName, tagValue));
            }
            else
            {
                result = fTagsFactory.CreateTag(Owner, this, tagName, tagValue);

                if (result != null)
                {
                    if (result is GEDCOMChildToFamilyLink)
                    {
                        result = ChildToFamilyLinks.Add(result as GEDCOMChildToFamilyLink);
                    }
                    else if (result is GEDCOMSpouseToFamilyLink)
                    {
                        result = SpouseToFamilyLinks.Add(result as GEDCOMSpouseToFamilyLink);
                    }
                    else if (result is GEDCOMIndividualOrdinance)
                    {
                        result = IndividualOrdinances.Add(result as GEDCOMIndividualOrdinance);
                    }
                    else if (result is GEDCOMAssociation)
                    {
                        result = Associations.Add(result as GEDCOMAssociation);
                    }
                    else if (result is GEDCOMIndividualEvent)
                    {
                        result = AddEvent(result as GEDCOMCustomEvent);
                    }
                    else if (result is GEDCOMIndividualAttribute)
                    {
                        result = AddEvent(result as GEDCOMCustomEvent);
                    }
                    else if (result is GEDCOMAlias)
                    {
                        result = Aliases.Add(result as GEDCOMAlias);
                    }
                }
                else
                {
                    result = base.AddTag(tagName, tagValue, tagConstructor);
                }
            }

            return(result);
        }