/// <summary>
 /// Visits the place description.
 /// </summary>
 /// <param name="place">The place description to visit.</param>
 public override void VisitPlaceDescription(Gx.Conclusion.PlaceDescription place)
 {
     if (place.Id != null)
     {
         this.dictionary.Add(place.Id, place);
     }
     base.VisitPlaceDescription(place);
 }
 private PlaceDescription CreateChestnutGrove()
 {
     PlaceDescription place = new PlaceDescription();
     place.SetId("KKK");
     place.SetLatitude(37.518304);
     place.SetLongitude(-76.984148);
     place.SetName("Chestnut Grove, New Kent, Virginia, United States");
     return place;
 }
 private PlaceDescription CreateMountVernon()
 {
     PlaceDescription place = new PlaceDescription();
     place.SetId("999");
     place.SetLatitude(38.721144);
     place.SetLongitude(-77.109461);
     place.SetName("Mount Vernon, Fairfax County, Virginia, United States");
     return place;
 }
 private PlaceDescription CreatePopesCreek()
 {
     PlaceDescription place = new PlaceDescription();
     place.SetId("888");
     place.SetLatitude(38.192353);
     place.SetLongitude(-76.904069);
     place.SetName("Pope's Creek, Westmoreland, Virginia, United States");
     return place;
 }
 public virtual void VisitPlaceDescription(PlaceDescription place)
 {
     this.contextStack.Push(place);
     VisitSubject(place);
     this.contextStack.Pop();
 }
Example #6
0
 /**
  * Build this out with a place.
  * @param place The place.
  * @return this.
  */
 public Gedcomx SetPlace(PlaceDescription place)
 {
     AddPlace(place);
     return this;
 }
Example #7
0
 /// <summary>
 /// Add a place to the data set.
 /// </summary>
 /// <param name="place">The place to be added.</param>
 public void AddPlace(PlaceDescription place)
 {
     if (place != null)
     {
         if (Places == null)
             Places = new List<PlaceDescription>();
         Places.Add(place);
     }
 }
 public override void VisitPlaceDescription(PlaceDescription place)
 {
     BindIfNeeded(place);
     base.VisitPlaceDescription(place);
 }
        private Person CreateGeorge(PlaceDescription birthPlace, PlaceDescription deathPlace)
        {
            Person person = new Person();
            person.SetGender(new Gender(GenderType.Male));

            Fact fact = new Fact();
            fact.SetId("123");
            fact.SetType(FactType.Birth);

            fact.SetDate(new DateInfo());
            fact.Date.SetOriginal("February 22, 1732");
            fact.Date.SetFormal("+1732-02-22");

            fact.SetPlace(new PlaceReference());
            fact.Place.SetOriginal(birthPlace.Names[0].Value.ToLower());
            fact.Place.DescriptionRef = "#" + birthPlace.Id;

            person.AddFact(fact);

            fact = new Fact();
            fact.SetId("456");
            fact.SetType(FactType.Death);

            fact.SetDate(new DateInfo());
            fact.Date.SetOriginal("December 14, 1799");
            fact.Date.SetFormal("+1799-12-14T22:00:00");

            fact.SetPlace(new PlaceReference());
            fact.Place.SetOriginal(deathPlace.Names[0].Value.ToLower());
            fact.Place.DescriptionRef = "#" + deathPlace.Id;

            person.AddFact(fact);

            List<Name> names = new List<Name>();
            Name name = new Name();
            NameForm nameForm = new NameForm();
            nameForm.SetFullText("George Washington");
            List<NamePart> parts = new List<NamePart>();
            NamePart part = new NamePart();
            part.SetType(NamePartType.Given);
            part.SetValue("George");
            parts.Add(part);
            part = new NamePart();
            part.SetType(NamePartType.Surname);
            part.SetValue("Washington");
            parts.Add(part);
            nameForm.Parts = parts;
            name.SetNameForm(nameForm);
            name.SetId("789");
            names.Add(name);
            person.Names = names;

            person.SetId("BBB-BBBB");

            return person;
        }
        private Person CreateMartha(PlaceDescription birthPlace, PlaceDescription deathPlace)
        {
            Person person = new Person();
            person.SetGender(new Gender(GenderType.Male));

            Fact fact = new Fact();
            fact.SetId("321");
            fact.SetType(FactType.Birth);

            fact.SetDate(new DateInfo());
            fact.Date.SetOriginal("June 2, 1731");
            fact.Date.SetFormal("+1731-06-02");

            fact.SetPlace(new PlaceReference());
            fact.Place.SetOriginal(birthPlace.Names[0].Value.ToLower());
            fact.Place.DescriptionRef = "#" + birthPlace.Id;

            person.AddFact(fact);

            fact = new Fact();
            fact.SetId("654");
            fact.SetType(FactType.Death);

            fact.SetDate(new DateInfo());
            fact.Date.SetOriginal("May 22, 1802");
            fact.Date.SetFormal("+1802-05-22");

            fact.SetPlace(new PlaceReference());
            fact.Place.SetOriginal(deathPlace.Names[0].Value.ToLower());
            fact.Place.DescriptionRef = "#" + deathPlace.Id;

            person.AddFact(fact);

            List<Name> names = new List<Name>();
            Name name = new Name();
            NameForm nameForm = new NameForm();
            nameForm.SetFullText("Martha Dandridge Custis");
            List<NamePart> parts = new List<NamePart>();
            NamePart part = new NamePart();
            part.SetType(NamePartType.Given);
            part.SetValue("Martha Dandridge");
            parts.Add(part);
            part = new NamePart();
            part.SetType(NamePartType.Surname);
            part.SetValue("Custis");
            parts.Add(part);
            nameForm.Parts = parts;
            name.SetNameForm(nameForm);
            name.SetId("987");
            names.Add(name);
            person.Names = names;

            person.SetId("CCC-CCCC");

            return person;
        }
 /**
  * Build out this place reference with a reference to a place description.
  *
  * @param description The reference to the place description.
  * @return this.
  */
 public PlaceReference SetDescription(PlaceDescription description)
 {
     DescriptionRef = "#" + description.Id;
     return this;
 }
Example #12
0
 /**
  * Build out this place reference with a reference to a place description.
  *
  * @param description The reference to the place description.
  * @return this.
  */
 public PlaceReference SetDescription(PlaceDescription description)
 {
     DescriptionRef = "#" + description.Id;
     return(this);
 }