Documentation ¶
Index ¶
- Constants
- func AbbrevWhatWhen(ev TimelineEvent) string
- func AbbrevWhatWhenWhere(ev TimelineEvent) string
- func ApplyAndRecurseAncestors(p *Person, fn PersonActionFunc) error
- func ApplyAndRecurseDescendants(p *Person, fn PersonActionFunc) error
- func ConditionalWhat(w Whater, adverb string) string
- func EventSortsBefore(ev, other TimelineEvent) bool
- func PassiveConditionalWhat(w Whater, adverb string) string
- func PassiveWhat(w Whater) string
- func PastPerfectWhat(w Whater) string
- func PresentPerfectWhat(w Whater) string
- func RecurseDescendantsAndApply(p *Person, fn PersonActionFunc) error
- func SortPeopleByGeneration(people []*Person)
- func SortPeopleByName(people []*Person)
- func SortTimelineEvents(evs []TimelineEvent)
- func What(w Whater) string
- func YearsSinceDeath(p *Person) (int, bool)
- type AnnulmentEvent
- type Anomaly
- type AnomalyCategory
- type ApprenticeEvent
- type ArrivalEvent
- type Association
- type AssociationKind
- type BaptismEvent
- type BattleEvent
- type BirthEvent
- type BuildingKind
- type BurialEvent
- type CensusEntry
- type CensusEntryMaritalStatus
- type CensusEntryRelation
- type CensusEvent
- func (e *CensusEvent) DirectlyInvolves(p *Person) bool
- func (e *CensusEvent) Entry(p *Person) (*CensusEntry, bool)
- func (e *CensusEvent) GetParticipants() []*EventParticipant
- func (e *CensusEvent) GetParticipantsByRole(r EventRole) []*EventParticipant
- func (e *CensusEvent) Head() *Person
- func (e *CensusEvent) ShortDescription() string
- func (e *CensusEvent) SortsBefore(other TimelineEvent) bool
- func (e *CensusEvent) Type() string
- func (e *CensusEvent) What() string
- type CitationMatcher
- type CitedMediaObject
- type CremationEvent
- type Crop
- type Date
- func (d *Date) AsYear() (*Date, bool)
- func (d *Date) DateInYear(long bool) (string, bool)
- func (d *Date) DecadeStart() (int, bool)
- func (d *Date) IntervalUntil(other *Date) *Interval
- func (d *Date) IsFirm() bool
- func (d *Date) IsMorePreciseThan(o *Date) bool
- func (d *Date) IsUnknown() bool
- func (d *Date) SameDate(other *Date) bool
- func (d *Date) SameYear(other *Date) bool
- func (d *Date) SortsBefore(other *Date) bool
- func (d *Date) String() string
- func (d *Date) When() string
- func (d *Date) WhenYear() (string, bool)
- func (d *Date) WholeYearsUntil(other *Date) (int, bool)
- func (d *Date) YM() (int, int, bool)
- func (d *Date) YMD() (int, int, int, bool)
- func (d *Date) Year() (int, bool)
- type DateDerivation
- type DeathEvent
- func (e *DeathEvent) ConditionalWhat(adverb string) string
- func (e *DeathEvent) PassiveConditionalWhat(adverb string) string
- func (e *DeathEvent) PassiveWhat() string
- func (e *DeathEvent) PastPerfectWhat() string
- func (e *DeathEvent) PresentPerfectWhat() string
- func (e *DeathEvent) ShortDescription() string
- func (e *DeathEvent) SortsBefore(other TimelineEvent) bool
- func (e *DeathEvent) Type() string
- func (e *DeathEvent) What() string
- type DemotionEvent
- type DepartureEvent
- type DivorceEvent
- type EconomicStatusEvent
- type EnlistmentEvent
- type EventDateType
- type EventMatcher
- type EventParticipant
- type EventRole
- type Fact
- type Family
- type FeatureImage
- type Gender
- func (g Gender) ChildNoun() string
- func (g Gender) IsFemale() bool
- func (g Gender) IsMale() bool
- func (g Gender) IsUnknown() bool
- func (g Gender) Noun() string
- func (g Gender) ObjectPronoun() string
- func (g Gender) Opposite() Gender
- func (g Gender) PossessivePronounPlural() string
- func (g Gender) PossessivePronounSingular() string
- func (g Gender) ReflexivePronoun() string
- func (g Gender) RelationToChildrenNoun() string
- func (g Gender) RelationToParentNoun() string
- func (g Gender) RelationToSiblingNoun() string
- func (g Gender) RelationToSpouseNoun() string
- func (g Gender) RelationToSpouseNounPlural() string
- func (g Gender) SubjectPronoun() string
- func (g Gender) SubjectPronounWithLink() string
- func (g Gender) WidowWidower() string
- type GeneralCitation
- type GeneralEvent
- func (e *GeneralEvent) EventDate() *Date
- func (e *GeneralEvent) GetAttribute(name string) (string, bool)
- func (e *GeneralEvent) GetCitations() []*GeneralCitation
- func (e *GeneralEvent) GetDate() *Date
- func (e *GeneralEvent) GetDetail() string
- func (e *GeneralEvent) GetNarrative() Text
- func (e *GeneralEvent) GetPlace() *Place
- func (e *GeneralEvent) IsInferred() bool
- func (e *GeneralEvent) ShortDescription() string
- func (e *GeneralEvent) Type() string
- func (e *GeneralEvent) What() string
- func (e *GeneralEvent) When() string
- func (e *GeneralEvent) Where() string
- type GeneralIndividualEvent
- type GeneralMultipartyEvent
- type GeneralUnionEvent
- func (e *GeneralUnionEvent) DirectlyInvolves(p *Person) bool
- func (e *GeneralUnionEvent) GetHusband() *Person
- func (e *GeneralUnionEvent) GetHusband1() *Person
- func (e *GeneralUnionEvent) GetOther(p *Person) *Person
- func (e *GeneralUnionEvent) GetParticipants() []*EventParticipant
- func (e *GeneralUnionEvent) GetParticipantsByRole(r EventRole) []*EventParticipant
- func (e *GeneralUnionEvent) GetWife() *Person
- func (e *GeneralUnionEvent) GetWife1() *Person
- type GeoLocation
- type IndividualNarrativeEvent
- type IndividualTimelineEvent
- type Inference
- type InstitutionDepartureEvent
- type InstitutionEntryEvent
- type InstitutionEvent
- type Interval
- type IrregularWhater
- type Link
- type MarriageBannsEvent
- func (e *MarriageBannsEvent) ConditionalWhat(adverb string) string
- func (e *MarriageBannsEvent) PassiveConditionalWhat(adverb string) string
- func (e *MarriageBannsEvent) PassiveWhat() string
- func (e *MarriageBannsEvent) PastPerfectWhat() string
- func (e *MarriageBannsEvent) PresentPerfectWhat() string
- func (e *MarriageBannsEvent) ShortDescription() string
- func (e *MarriageBannsEvent) SortsBefore(other TimelineEvent) bool
- func (e *MarriageBannsEvent) Type() string
- func (e *MarriageBannsEvent) What() string
- type MarriageEvent
- type MarriageLicenseEvent
- func (e *MarriageLicenseEvent) ConditionalWhat(adverb string) string
- func (e *MarriageLicenseEvent) PassiveConditionalWhat(adverb string) string
- func (e *MarriageLicenseEvent) PassiveWhat() string
- func (e *MarriageLicenseEvent) PastPerfectWhat() string
- func (e *MarriageLicenseEvent) PresentPerfectWhat() string
- func (e *MarriageLicenseEvent) ShortDescription() string
- func (e *MarriageLicenseEvent) SortsBefore(other TimelineEvent) bool
- func (e *MarriageLicenseEvent) Type() string
- func (e *MarriageLicenseEvent) What() string
- type MediaObject
- type MemorialEvent
- type ModeOfDeath
- type MultipartyTimelineEvent
- type MusterEvent
- type Name
- type ObjectLink
- type Occupation
- type OccupationEvent
- type OccupationGroup
- type OccupationStatus
- type POV
- type Person
- func (p *Person) AgeInYearsAt(dt *Date) (int, bool)
- func (p *Person) AgeInYearsAtDeath() (int, bool)
- func (p *Person) AllCitations() []*GeneralCitation
- func (p *Person) BestBirthDate() *Date
- func (p *Person) BestDeathDate() *Date
- func (p *Person) Generation() int
- func (p *Person) IsCloseToDirectAncestor() bool
- func (p *Person) IsDirectAncestor() bool
- func (p *Person) IsUnknown() bool
- func (p *Person) OccupationAt(dt *Date) *Occupation
- func (p *Person) PreciseAgeAt(dt *Date) (*gdate.PreciseInterval, bool)
- func (p *Person) RedactNames(name string)
- func (p *Person) RelationTo(other *Person, dt *Date) string
- func (p *Person) RemoveDuplicateChildren()
- func (p *Person) RemoveDuplicateFamilies()
- func (p *Person) RemoveDuplicateSpouses()
- func (p *Person) SameAs(other *Person) bool
- type PersonActionFunc
- type PersonMatcher
- func PersonDoesNotHaveCommonAncestor() PersonMatcher
- func PersonHasCommonAncestor() PersonMatcher
- func PersonHasResearchNotes() PersonMatcher
- func PersonHasTag(tag string) PersonMatcher
- func PersonIsCloseToDirectAncestor() PersonMatcher
- func PersonIsDirectAncestor() PersonMatcher
- func PersonIsFeatured() PersonMatcher
- func PersonIsNotDirectAncestor() PersonMatcher
- func PersonIsPuzzle() PersonMatcher
- type Place
- type PlaceMatcher
- type PlaceType
- type ProbateEvent
- func (e *ProbateEvent) ConditionalWhat(adverb string) string
- func (e *ProbateEvent) PassiveConditionalWhat(adverb string) string
- func (e *ProbateEvent) PassiveWhat() string
- func (e *ProbateEvent) PastPerfectWhat() string
- func (e *ProbateEvent) PresentPerfectWhat() string
- func (e *ProbateEvent) ShortDescription() string
- func (e *ProbateEvent) Type() string
- func (e *ProbateEvent) What() string
- type PromotionEvent
- type Region
- type Relation
- func (r *Relation) Distance() int
- func (r *Relation) ExtendToChild(ch *Person) *Relation
- func (r *Relation) ExtendToParent(parent *Person) *Relation
- func (r *Relation) ExtendToSpouse(spouse *Person) *Relation
- func (r *Relation) HasCommonAncestor() bool
- func (r *Relation) IsChild() bool
- func (r *Relation) IsCloseToDirectAncestor() bool
- func (r *Relation) IsDirectAncestor() bool
- func (r *Relation) IsDirectDescendant() bool
- func (r *Relation) IsParent() bool
- func (r *Relation) IsSelf() bool
- func (r *Relation) IsUnknown() bool
- func (r *Relation) Name() string
- func (r *Relation) Path() []*Person
- type Repository
- type RepositoryRef
- type ResidenceRecordedEvent
- type SaleOfPropertyEvent
- type Source
- type Text
- type Timeline
- type TimelineEvent
- type ToDo
- type ToDoCategory
- type UnionTimelineEvent
- type Whater
- type WillEvent
Constants ¶
const ( EventAttributeEmployer = "employer" EventAttributeService = "service" // military service: merchant navy, army, royal artillery etc. EventAttributeRegiment = "regiment" EventAttributeBattalion = "battalion" EventAttributeCompany = "company" EventAttributeRank = "rank" )
const ( FactCategoryAKA = "Also known as" FactCategoryMilitaryServiceNumber = "Military service number" FactCategorySeamansTicket = "Seaman's ticket" FactCategoryCauseOfDeath = "Cause of death" )
const ( FamilyBondMarried = "married" FamilyBondUnmarried = "unmarried" FamilyBondLikelyMarried = "likely married" FamilyBondLikelyUnmarried = "likely unmarried" FamilyBondUnknown = "unknown" FamilyEndReasonUnknown = "unknown" FamilyEndReasonDivorce = "divorce" FamilyEndReasonDeath = "death" FamilyEndReasonAnulment = "anulment" )
const ( GenderMale = "man" GenderFemale = "woman" GenderUnknown = "unknown" )
const ( InferenceTypeYearOfBirth = "Year of birth" InferenceTypeYearOfDeath = "Year of death" InferenceTypeModeOfDeath = "Mode of death" InferenceTypeGeneralFact = "General fact" )
const ( UnknownNamePlaceholder = "–?–" // en dashes, sorts after other names UnknownDateRangePlaceholder = "–?–" )
const ( PlaceTypeUnknown = "place" PlaceTypeAddress = "address" PlaceTypeCountry = "country" PlaceTypeBuilding = "building" PlaceTypeBurialGround = "burial ground" PlaceTypeStreet = "street" PlaceTypeShip = "ship" PlaceTypeCategory = "category" // used ony for grouping related places PlaceTypeCity = "city" PlaceTypeTown = "town" PlaceTypeVillage = "village" PlaceTypeHamlet = "hamlet" PlaceTypeParish = "parish" PlaceTypeCounty = "county" PlaceTypeRegistrationDistrict = "registration district" )
const ( BuildingKindNone = "" BuildingKindChurch = "church" BuildingKindWorkhouse = "workhouse" BuildingKindRegisterOffice = "register office" BuildingKindFarm = "farm" BuildingKindHospital = "hospital" )
const MaxDistance = 1000
Variables ¶
This section is empty.
Functions ¶
func AbbrevWhatWhen ¶
func AbbrevWhatWhen(ev TimelineEvent) string
func AbbrevWhatWhenWhere ¶
func AbbrevWhatWhenWhere(ev TimelineEvent) string
func ApplyAndRecurseAncestors ¶
func ApplyAndRecurseAncestors(p *Person, fn PersonActionFunc) error
ApplyAndRecurseAncestors applies fn to p and then recurses ancestors until fn returns false or an error, which is returned if encountered
func ApplyAndRecurseDescendants ¶
func ApplyAndRecurseDescendants(p *Person, fn PersonActionFunc) error
ApplyAndRecurseDescendants applies fn to p and then recurses descendants until fn returns false or an error which is returned if encountered
func ConditionalWhat ¶
ConditionalWhat returns an active verb phrase with a conditional such as "probably" in the past tense describing what happened.
func EventSortsBefore ¶
func EventSortsBefore(ev, other TimelineEvent) bool
EventSortsBefore reports whether ev sorts before other
func PassiveConditionalWhat ¶
PassiveConditionalWhat returns a passive verb phrase with a conditional such as "probably" in the past tense describing what happened.
func PassiveWhat ¶
PassiveWhat returns a passive verb phrase in the past tense describing what happened.
func PastPerfectWhat ¶
func PresentPerfectWhat ¶
func RecurseDescendantsAndApply ¶
func RecurseDescendantsAndApply(p *Person, fn PersonActionFunc) error
RecurseDescendantsAndApply recurses descendants and then applies fn to p until fn returns an error which is returned if encountered. This differs from ApplyAndRecurseDescendants in the order in which fn is applied.
func SortPeopleByGeneration ¶
func SortPeopleByGeneration(people []*Person)
func SortPeopleByName ¶
func SortPeopleByName(people []*Person)
func SortTimelineEvents ¶
func SortTimelineEvents(evs []TimelineEvent)
func YearsSinceDeath ¶
Types ¶
type AnnulmentEvent ¶
type AnnulmentEvent struct { GeneralEvent GeneralUnionEvent }
AnnulmentEvent represents the ending of a marriage by anulment in a timeline
func (*AnnulmentEvent) ShortDescription ¶
func (e *AnnulmentEvent) ShortDescription() string
func (*AnnulmentEvent) SortsBefore ¶
func (e *AnnulmentEvent) SortsBefore(other TimelineEvent) bool
func (*AnnulmentEvent) Type ¶
func (e *AnnulmentEvent) Type() string
func (*AnnulmentEvent) What ¶
func (e *AnnulmentEvent) What() string
type Anomaly ¶
type Anomaly struct { Category AnomalyCategory Text string Context string }
An Anomaly is something detected in existing data that can be corrected manually
type AnomalyCategory ¶
type AnomalyCategory string
const ( AnomalyCategoryAttribute AnomalyCategory = "Attribute" AnomalyCategoryCitation AnomalyCategory = "Citation" AnomalyCategoryEvent AnomalyCategory = "Event" AnomalyCategoryName AnomalyCategory = "Name" )
func (AnomalyCategory) String ¶
func (c AnomalyCategory) String() string
type ApprenticeEvent ¶
type ApprenticeEvent struct { GeneralEvent GeneralIndividualEvent }
ApprenticeEvent represents the commencement of an apprenticeship of a person
func (*ApprenticeEvent) ShortDescription ¶
func (e *ApprenticeEvent) ShortDescription() string
func (*ApprenticeEvent) Type ¶
func (e *ApprenticeEvent) Type() string
func (*ApprenticeEvent) What ¶
func (e *ApprenticeEvent) What() string
type ArrivalEvent ¶
type ArrivalEvent struct { GeneralEvent GeneralIndividualEvent }
ArrivalEvent represents the arrival of a person at a place
func (*ArrivalEvent) ShortDescription ¶
func (e *ArrivalEvent) ShortDescription() string
func (*ArrivalEvent) Type ¶
func (e *ArrivalEvent) Type() string
func (*ArrivalEvent) What ¶
func (e *ArrivalEvent) What() string
type Association ¶
type Association struct { Kind AssociationKind Other *Person Citations []*GeneralCitation }
type AssociationKind ¶
type AssociationKind string
const (
AssociationKindTwin AssociationKind = "twin"
)
type BaptismEvent ¶
type BaptismEvent struct { GeneralEvent GeneralIndividualEvent }
BaptismEvent represents the baptism of a person in their timeline
func (*BaptismEvent) ShortDescription ¶
func (e *BaptismEvent) ShortDescription() string
func (*BaptismEvent) SortsBefore ¶
func (e *BaptismEvent) SortsBefore(other TimelineEvent) bool
func (*BaptismEvent) Type ¶
func (e *BaptismEvent) Type() string
func (*BaptismEvent) What ¶
func (e *BaptismEvent) What() string
type BattleEvent ¶
type BattleEvent struct { GeneralEvent GeneralMultipartyEvent }
BattleEvent represents the recording of a person's participation in a battle
func (*BattleEvent) ShortDescription ¶
func (e *BattleEvent) ShortDescription() string
func (*BattleEvent) Type ¶
func (e *BattleEvent) Type() string
type BirthEvent ¶
type BirthEvent struct { GeneralEvent GeneralIndividualEvent }
BirthEvent represents the birth of a person in their timeline
func (*BirthEvent) ShortDescription ¶
func (e *BirthEvent) ShortDescription() string
func (*BirthEvent) SortsBefore ¶
func (e *BirthEvent) SortsBefore(other TimelineEvent) bool
func (*BirthEvent) Type ¶
func (e *BirthEvent) Type() string
func (*BirthEvent) What ¶
func (e *BirthEvent) What() string
type BuildingKind ¶
type BuildingKind string
func (BuildingKind) String ¶
func (p BuildingKind) String() string
type BurialEvent ¶
type BurialEvent struct { GeneralEvent GeneralIndividualEvent }
BurialEvent represents the burial of a person in their timeline
func (*BurialEvent) ShortDescription ¶
func (e *BurialEvent) ShortDescription() string
func (*BurialEvent) SortsBefore ¶
func (e *BurialEvent) SortsBefore(other TimelineEvent) bool
func (*BurialEvent) Type ¶
func (e *BurialEvent) Type() string
func (*BurialEvent) What ¶
func (e *BurialEvent) What() string
type CensusEntry ¶
type CensusEntry struct { Principal *Person RelationToHead CensusEntryRelation // cleaned Name string // as recorded Sex string // as recorded MaritalStatus CensusEntryMaritalStatus Age string // as recorded Occupation string // as recorded PlaceOfBirth string // as recorded Impairment string // as recorded (deaf and dumb, blind, imbecile etc) Detail string // any remaining unparsed detail Narrative string // hand written narrative, if any }
type CensusEntryMaritalStatus ¶
type CensusEntryMaritalStatus string
const ( CensusEntryMaritalStatusUnknown CensusEntryMaritalStatus = "" CensusEntryMaritalStatusMarried CensusEntryMaritalStatus = "married" CensusEntryMaritalStatusUnmarried CensusEntryMaritalStatus = "unmarried" CensusEntryMaritalStatusWidowed CensusEntryMaritalStatus = "widowed" CensusEntryMaritalStatusDivorced CensusEntryMaritalStatus = "divorced" )
func (CensusEntryMaritalStatus) String ¶
func (c CensusEntryMaritalStatus) String() string
type CensusEntryRelation ¶
type CensusEntryRelation string
const ( CensusEntryRelationUnknown CensusEntryRelation = "" CensusEntryRelationHead CensusEntryRelation = "head" CensusEntryRelationWife CensusEntryRelation = "wife" CensusEntryRelationHusband CensusEntryRelation = "husband" CensusEntryRelationSon CensusEntryRelation = "son" CensusEntryRelationDaughter CensusEntryRelation = "daughter" CensusEntryRelationChild CensusEntryRelation = "child" CensusEntryRelationFather CensusEntryRelation = "father" CensusEntryRelationMother CensusEntryRelation = "mother" CensusEntryRelationUncle CensusEntryRelation = "uncle" CensusEntryRelationAunt CensusEntryRelation = "aunt" CensusEntryRelationLodger CensusEntryRelation = "lodger" CensusEntryRelationBoarder CensusEntryRelation = "boarder" CensusEntryRelationInmate CensusEntryRelation = "inmate" CensusEntryRelationPatient CensusEntryRelation = "patient" CensusEntryRelationServant CensusEntryRelation = "servant" CensusEntryRelationNephew CensusEntryRelation = "nephew" CensusEntryRelationNiece CensusEntryRelation = "niece" CensusEntryRelationBrother CensusEntryRelation = "brother" CensusEntryRelationSister CensusEntryRelation = "sister" CensusEntryRelationSonInLaw CensusEntryRelation = "son-in-law" CensusEntryRelationDaughterInLaw CensusEntryRelation = "daughter-in-law" CensusEntryRelationFatherInLaw CensusEntryRelation = "father-in-law" CensusEntryRelationMotherInLaw CensusEntryRelation = "mother-in-law" CensusEntryRelationBrotherInLaw CensusEntryRelation = "brother-in-law" CensusEntryRelationSisterInLaw CensusEntryRelation = "sister-in-law" CensusEntryRelationGrandson CensusEntryRelation = "grandson" CensusEntryRelationGranddaughter CensusEntryRelation = "granddaughter" CensusEntryRelationVisitor CensusEntryRelation = "visitor" CensusEntryRelationSoldier CensusEntryRelation = "soldier" CensusEntryRelationFosterChild CensusEntryRelation = "foster child" )
These can all be followed by " of the head of the household." (except head and any impersonal ones)
func (CensusEntryRelation) IsImpersonal ¶
func (r CensusEntryRelation) IsImpersonal() bool
IsImpersonal reports whether the relation is to the place rather than the head
func (CensusEntryRelation) String ¶
func (r CensusEntryRelation) String() string
type CensusEvent ¶
type CensusEvent struct { GeneralEvent Entries []*CensusEntry }
CensusEvent represents the taking of a census in a timeline It is a shared event
func (*CensusEvent) DirectlyInvolves ¶
func (e *CensusEvent) DirectlyInvolves(p *Person) bool
func (*CensusEvent) Entry ¶
func (e *CensusEvent) Entry(p *Person) (*CensusEntry, bool)
func (*CensusEvent) GetParticipants ¶
func (e *CensusEvent) GetParticipants() []*EventParticipant
func (*CensusEvent) GetParticipantsByRole ¶
func (e *CensusEvent) GetParticipantsByRole(r EventRole) []*EventParticipant
func (*CensusEvent) Head ¶
func (e *CensusEvent) Head() *Person
func (*CensusEvent) ShortDescription ¶
func (e *CensusEvent) ShortDescription() string
func (*CensusEvent) SortsBefore ¶
func (e *CensusEvent) SortsBefore(other TimelineEvent) bool
func (*CensusEvent) Type ¶
func (e *CensusEvent) Type() string
func (*CensusEvent) What ¶
func (e *CensusEvent) What() string
type CitationMatcher ¶
type CitationMatcher func(*GeneralCitation) bool
type CitedMediaObject ¶
type CitedMediaObject struct { Object *MediaObject Highlight *Region }
type CremationEvent ¶
type CremationEvent struct { GeneralEvent GeneralIndividualEvent }
CremationEvent represents the cremation of a person in their timeline
func (*CremationEvent) SortsBefore ¶
func (e *CremationEvent) SortsBefore(other TimelineEvent) bool
func (*CremationEvent) Type ¶
func (e *CremationEvent) Type() string
func (*CremationEvent) What ¶
func (e *CremationEvent) What() string
type Date ¶
type Date struct { Date gdate.Date Derivation DateDerivation }
func BeforeYear ¶
func PreciseDate ¶
func UnknownDate ¶
func UnknownDate() *Date
func WithinDecade ¶
func (*Date) DecadeStart ¶
func (*Date) IntervalUntil ¶
func (*Date) IsFirm ¶
IsEstimated reports whether d is a firm date or date range. Imprecise or estimated dates return false.
func (*Date) IsMorePreciseThan ¶
IsMorePreciseThan reports whether d is more a more precise date than o.
func (*Date) SortsBefore ¶
type DateDerivation ¶
type DateDerivation int
const ( DateDerivationStandard DateDerivation = 0 // date is as given in source DateDerivationEstimated DateDerivation = 1 // date was estimated from typical values (such as year of birth estimated from marriage) DateDerivationCalculated DateDerivation = 2 // date was calculated from another date (such as date of birth calculated using age at death) )
func (DateDerivation) Abbrev ¶
func (d DateDerivation) Abbrev() string
func (DateDerivation) Qualifier ¶
func (d DateDerivation) Qualifier() string
type DeathEvent ¶
type DeathEvent struct { GeneralEvent GeneralIndividualEvent }
DeathEvent represents the death of a person in their timeline
func (*DeathEvent) ConditionalWhat ¶
func (e *DeathEvent) ConditionalWhat(adverb string) string
func (*DeathEvent) PassiveConditionalWhat ¶
func (e *DeathEvent) PassiveConditionalWhat(adverb string) string
func (*DeathEvent) PassiveWhat ¶
func (e *DeathEvent) PassiveWhat() string
func (*DeathEvent) PastPerfectWhat ¶
func (e *DeathEvent) PastPerfectWhat() string
func (*DeathEvent) PresentPerfectWhat ¶
func (e *DeathEvent) PresentPerfectWhat() string
func (*DeathEvent) ShortDescription ¶
func (e *DeathEvent) ShortDescription() string
func (*DeathEvent) SortsBefore ¶
func (e *DeathEvent) SortsBefore(other TimelineEvent) bool
func (*DeathEvent) Type ¶
func (e *DeathEvent) Type() string
func (*DeathEvent) What ¶
func (e *DeathEvent) What() string
type DemotionEvent ¶
type DemotionEvent struct { GeneralEvent GeneralIndividualEvent }
Demotion represents the demotion of a person in their employment
func (*DemotionEvent) ShortDescription ¶
func (e *DemotionEvent) ShortDescription() string
func (*DemotionEvent) Type ¶
func (e *DemotionEvent) Type() string
type DepartureEvent ¶
type DepartureEvent struct { GeneralEvent GeneralIndividualEvent }
DepartureEvent represents the departure of a person from a place
func (*DepartureEvent) ShortDescription ¶
func (e *DepartureEvent) ShortDescription() string
func (*DepartureEvent) Type ¶
func (e *DepartureEvent) Type() string
func (*DepartureEvent) What ¶
func (e *DepartureEvent) What() string
type DivorceEvent ¶
type DivorceEvent struct { GeneralEvent GeneralUnionEvent }
DivorceEvent represents the ending of a marriage by divorce in a timeline
func (*DivorceEvent) ShortDescription ¶
func (e *DivorceEvent) ShortDescription() string
func (*DivorceEvent) SortsBefore ¶
func (e *DivorceEvent) SortsBefore(other TimelineEvent) bool
func (*DivorceEvent) Type ¶
func (e *DivorceEvent) Type() string
func (*DivorceEvent) What ¶
func (e *DivorceEvent) What() string
type EconomicStatusEvent ¶
type EconomicStatusEvent struct { GeneralEvent GeneralIndividualEvent }
EconomicStatusEvent represents the economic status of a person
func (*EconomicStatusEvent) ShortDescription ¶
func (e *EconomicStatusEvent) ShortDescription() string
func (*EconomicStatusEvent) Type ¶
func (e *EconomicStatusEvent) Type() string
type EnlistmentEvent ¶
type EnlistmentEvent struct { GeneralEvent GeneralIndividualEvent }
EnlistmentEvent represents the enlisting of a person to a military service
func (*EnlistmentEvent) ShortDescription ¶
func (e *EnlistmentEvent) ShortDescription() string
func (*EnlistmentEvent) Type ¶
func (e *EnlistmentEvent) Type() string
type EventDateType ¶
type EventDateType string
const ( EventDateTypeOccurred EventDateType = "occurred" // the date represents the date the event occurred EventDateTypeRecorded EventDateType = "recorded" // the date represents the date the event was recorded )
type EventMatcher ¶
type EventMatcher func(TimelineEvent) bool
type EventParticipant ¶
func (*EventParticipant) IsUnknown ¶
func (e *EventParticipant) IsUnknown() bool
type EventRole ¶
type EventRole string
const ( EventRoleUnknown EventRole = "unknown" EventRolePrincipal EventRole = "principal" EventRoleHusband EventRole = "husband" EventRoleWife EventRole = "wife" EventRoleWitness EventRole = "witness" // witness to a marriage, will or other legal document EventRoleGodparent EventRole = "godparent" EventRoleBeneficiary EventRole = "beneficiary" // beneficiary of a will EventRoleExecutor EventRole = "executor" // executor of a will )
type Fact ¶
type Fact struct { Category string Detail string Comment string // an explanatatory comment to be used alongside or as a footnote to the title Citations []*GeneralCitation }
func ParseCauseOfDeathFact ¶
func ParseCauseOfDeathFact(text string, citations []*GeneralCitation) *Fact
type Family ¶
type Family struct { ID string // canonical id // Page string // path to page in site Tags []string // tags to add to the person's page PreferredUniqueName string // name used to identify the family Father *Person Mother *Person Children []*Person BestStartEvent TimelineEvent // event that best represents the start of the family unit if the bond is a marriage type BestEndEvent TimelineEvent // event that best represents the end of the family unit if the bond is a marriage type BestStartDate *Date // date that best represents the start of the family unit BestEndDate *Date // date that best represents the end of the family unit Timeline []TimelineEvent Bond string // the kind of bond between the parents in the family EndReason string // the reason the family unit ended EndDeathPerson *Person // the person whose death ended the family unit, if any PublishChildren bool // true if this family's children should always be included in the publish set }
func (*Family) OtherParent ¶
type FeatureImage ¶
type FeatureImage struct { MediaObject MediaObject Crop *Region }
type Gender ¶
type Gender string
func (Gender) ObjectPronoun ¶
func (Gender) PossessivePronounPlural ¶
func (Gender) PossessivePronounSingular ¶
func (Gender) ReflexivePronoun ¶
func (Gender) RelationToChildrenNoun ¶
RelationToChildrenNoun returns the general noun to use for child relation: father/mother or parent if gender is unknown (this person is the ___ of their child)
func (Gender) RelationToParentNoun ¶
RelationToParentNoun returns the general noun to use for parent relation: son/daughter or child if gender is unknown (this person is the ___ of their parent)
func (Gender) RelationToSiblingNoun ¶
RelationToSpouseNoun returns the general noun to use for sibling relation: brother/sister or sibling if gender is unknown (this person is the ___ of their sibling)
func (Gender) RelationToSpouseNoun ¶
RelationToSpouseNoun returns the general noun to use for spouse relation: husband/wife or spouse if gender is unknown (this person is the ___ of their spouse)
func (Gender) RelationToSpouseNounPlural ¶
func (Gender) SubjectPronoun ¶
func (Gender) SubjectPronounWithLink ¶
func (Gender) WidowWidower ¶
WidowWidower returns a word that fits the sentence: "when their spouse died, x was left a <widow/widower>"
type GeneralCitation ¶
type GeneralCitation struct { Date *Date Source *Source Detail string ID string GrampsID string // the original gramps id, if any TranscriptionDate *Date TranscriptionText []Text Comments []Text ResearchNotes []Text URL *Link MediaObjects []*CitedMediaObject EventsCited []TimelineEvent PeopleCited []*Person Redacted bool // true if the citation's details should be redacted LastUpdated *time.Time // time of last update, if known }
func FilterCitationList ¶
func FilterCitationList(cits []*GeneralCitation, include CitationMatcher) []*GeneralCitation
FilterCitationList returns a new slice that includes only the ciitations that match the supplied CitationMatcher
func (*GeneralCitation) SourceTitle ¶
func (c *GeneralCitation) SourceTitle() string
func (*GeneralCitation) String ¶
func (c *GeneralCitation) String() string
type GeneralEvent ¶
type GeneralEvent struct { Date *Date Place *Place Title string // used for the return value of "What()" Detail string Citations []*GeneralCitation Inferred bool Narrative Text // hand written narrative, if any Attributes map[string]string }
func (*GeneralEvent) EventDate ¶
func (e *GeneralEvent) EventDate() *Date
func (*GeneralEvent) GetAttribute ¶
func (e *GeneralEvent) GetAttribute(name string) (string, bool)
func (*GeneralEvent) GetCitations ¶
func (e *GeneralEvent) GetCitations() []*GeneralCitation
func (*GeneralEvent) GetDate ¶
func (e *GeneralEvent) GetDate() *Date
func (*GeneralEvent) GetDetail ¶
func (e *GeneralEvent) GetDetail() string
func (*GeneralEvent) GetNarrative ¶
func (e *GeneralEvent) GetNarrative() Text
func (*GeneralEvent) GetPlace ¶
func (e *GeneralEvent) GetPlace() *Place
func (*GeneralEvent) IsInferred ¶
func (e *GeneralEvent) IsInferred() bool
func (*GeneralEvent) ShortDescription ¶
func (e *GeneralEvent) ShortDescription() string
func (*GeneralEvent) Type ¶
func (e *GeneralEvent) Type() string
func (*GeneralEvent) What ¶
func (e *GeneralEvent) What() string
func (*GeneralEvent) When ¶
func (e *GeneralEvent) When() string
func (*GeneralEvent) Where ¶
func (e *GeneralEvent) Where() string
type GeneralIndividualEvent ¶
type GeneralIndividualEvent struct { Principal *Person OtherParticipants []*EventParticipant }
GeneralPartyEvent is a general event involving one individual.
func (*GeneralIndividualEvent) DirectlyInvolves ¶
func (e *GeneralIndividualEvent) DirectlyInvolves(p *Person) bool
func (*GeneralIndividualEvent) GetParticipants ¶
func (e *GeneralIndividualEvent) GetParticipants() []*EventParticipant
func (*GeneralIndividualEvent) GetParticipantsByRole ¶
func (e *GeneralIndividualEvent) GetParticipantsByRole(r EventRole) []*EventParticipant
func (*GeneralIndividualEvent) GetPrincipal ¶
func (e *GeneralIndividualEvent) GetPrincipal() *Person
type GeneralMultipartyEvent ¶
type GeneralMultipartyEvent struct {
Participants []*EventParticipant
}
GeneralMultipartyEvent is a general event involving multiple parties.
func (*GeneralMultipartyEvent) DirectlyInvolves ¶
func (e *GeneralMultipartyEvent) DirectlyInvolves(p *Person) bool
func (*GeneralMultipartyEvent) GetParticipants ¶
func (e *GeneralMultipartyEvent) GetParticipants() []*EventParticipant
func (*GeneralMultipartyEvent) GetParticipantsByRole ¶
func (e *GeneralMultipartyEvent) GetParticipantsByRole(r EventRole) []*EventParticipant
func (*GeneralMultipartyEvent) GetPrincipals ¶
func (e *GeneralMultipartyEvent) GetPrincipals() []*Person
type GeneralUnionEvent ¶
type GeneralUnionEvent struct { Husband *Person Wife *Person OtherParticipants []*EventParticipant }
GeneralUnionEvent is a general event involving the union of two parties.
func (*GeneralUnionEvent) DirectlyInvolves ¶
func (e *GeneralUnionEvent) DirectlyInvolves(p *Person) bool
func (*GeneralUnionEvent) GetHusband ¶
func (e *GeneralUnionEvent) GetHusband() *Person
func (*GeneralUnionEvent) GetHusband1 ¶
func (e *GeneralUnionEvent) GetHusband1() *Person
func (*GeneralUnionEvent) GetOther ¶
func (e *GeneralUnionEvent) GetOther(p *Person) *Person
func (*GeneralUnionEvent) GetParticipants ¶
func (e *GeneralUnionEvent) GetParticipants() []*EventParticipant
func (*GeneralUnionEvent) GetParticipantsByRole ¶
func (e *GeneralUnionEvent) GetParticipantsByRole(r EventRole) []*EventParticipant
func (*GeneralUnionEvent) GetWife ¶
func (e *GeneralUnionEvent) GetWife() *Person
func (*GeneralUnionEvent) GetWife1 ¶
func (e *GeneralUnionEvent) GetWife1() *Person
type GeoLocation ¶
type IndividualNarrativeEvent ¶
type IndividualNarrativeEvent struct { GeneralEvent GeneralIndividualEvent }
IndividualNarrativeEvent represents some narrative that can be used as-is
func (*IndividualNarrativeEvent) ShortDescription ¶
func (e *IndividualNarrativeEvent) ShortDescription() string
type IndividualTimelineEvent ¶
type IndividualTimelineEvent interface { TimelineEvent GetPrincipal() *Person }
IndividualTimelineEvent is a timeline event involving one individual.
type Inference ¶
func (*Inference) AsCitation ¶
func (inf *Inference) AsCitation() *GeneralCitation
type InstitutionDepartureEvent ¶
type InstitutionDepartureEvent struct { GeneralEvent GeneralIndividualEvent }
InstitutionDepartureEvent represents the discharge of a person from an institution
func (*InstitutionDepartureEvent) ShortDescription ¶
func (e *InstitutionDepartureEvent) ShortDescription() string
func (*InstitutionDepartureEvent) Type ¶
func (e *InstitutionDepartureEvent) Type() string
func (*InstitutionDepartureEvent) What ¶
func (e *InstitutionDepartureEvent) What() string
type InstitutionEntryEvent ¶
type InstitutionEntryEvent struct { GeneralEvent GeneralIndividualEvent }
InstitutionEntryEvent represents the admission of a person to an institution
func (*InstitutionEntryEvent) ShortDescription ¶
func (e *InstitutionEntryEvent) ShortDescription() string
func (*InstitutionEntryEvent) Type ¶
func (e *InstitutionEntryEvent) Type() string
func (*InstitutionEntryEvent) What ¶
func (e *InstitutionEntryEvent) What() string
type InstitutionEvent ¶
type InstitutionEvent struct { GeneralEvent GeneralIndividualEvent }
InstitutionEvent represents the discharge of a person from an institution
func (*InstitutionEvent) ShortDescription ¶
func (e *InstitutionEvent) ShortDescription() string
func (*InstitutionEvent) Type ¶
func (e *InstitutionEvent) Type() string
func (*InstitutionEvent) What ¶
func (e *InstitutionEvent) What() string
type Interval ¶
func IntervalSince ¶
func UnknownInterval ¶
func UnknownInterval() *Interval
func (*Interval) ApproxDays ¶
func (*Interval) WholeYears ¶
type IrregularWhater ¶
type IrregularWhater interface { PassiveWhat() string // text description of what happened, a passive verb in the past tense, such as "was married", "was born", "died" ConditionalWhat(adverb string) string // text description of what happened, an active verb in the past tense with a conditonal, such as "probably married", "probate probably granted" PassiveConditionalWhat(adverb string) string // text description of what happened, a passive verb in the past tense with a conditonal, such as was "was probably married", "probate was probably granted" PresentPerfectWhat() string // text description of what happened, a passive verb in the present perfect tense, usually prefixed by "inferred to ", such as "[inferred to ]have been married", "[inferred to ]have died" PastPerfectWhat() string // text description of what happened, a passive verb in the past perfect tense, such as "had been married", "had died" }
optional interface for event grammar
type Link ¶
func LinkFromURL ¶
type MarriageBannsEvent ¶
type MarriageBannsEvent struct { GeneralEvent GeneralUnionEvent }
MarriageBannsEvent represents the event that public notice is given that two people intend to marry
func (*MarriageBannsEvent) ConditionalWhat ¶
func (e *MarriageBannsEvent) ConditionalWhat(adverb string) string
func (*MarriageBannsEvent) PassiveConditionalWhat ¶
func (e *MarriageBannsEvent) PassiveConditionalWhat(adverb string) string
func (*MarriageBannsEvent) PassiveWhat ¶
func (e *MarriageBannsEvent) PassiveWhat() string
func (*MarriageBannsEvent) PastPerfectWhat ¶
func (e *MarriageBannsEvent) PastPerfectWhat() string
func (*MarriageBannsEvent) PresentPerfectWhat ¶
func (e *MarriageBannsEvent) PresentPerfectWhat() string
func (*MarriageBannsEvent) ShortDescription ¶
func (e *MarriageBannsEvent) ShortDescription() string
func (*MarriageBannsEvent) SortsBefore ¶
func (e *MarriageBannsEvent) SortsBefore(other TimelineEvent) bool
func (*MarriageBannsEvent) Type ¶
func (e *MarriageBannsEvent) Type() string
func (*MarriageBannsEvent) What ¶
func (e *MarriageBannsEvent) What() string
type MarriageEvent ¶
type MarriageEvent struct { GeneralEvent GeneralUnionEvent }
MarriageEvent represents the joining of two people in marriage in a timeline
func (*MarriageEvent) ShortDescription ¶
func (e *MarriageEvent) ShortDescription() string
func (*MarriageEvent) SortsBefore ¶
func (e *MarriageEvent) SortsBefore(other TimelineEvent) bool
func (*MarriageEvent) Type ¶
func (e *MarriageEvent) Type() string
func (*MarriageEvent) What ¶
func (e *MarriageEvent) What() string
type MarriageLicenseEvent ¶
type MarriageLicenseEvent struct { GeneralEvent GeneralUnionEvent }
MarriageLicenseEvent represents the event where two people obtain a license to marry
func (*MarriageLicenseEvent) ConditionalWhat ¶
func (e *MarriageLicenseEvent) ConditionalWhat(adverb string) string
func (*MarriageLicenseEvent) PassiveConditionalWhat ¶
func (e *MarriageLicenseEvent) PassiveConditionalWhat(adverb string) string
func (*MarriageLicenseEvent) PassiveWhat ¶
func (e *MarriageLicenseEvent) PassiveWhat() string
func (*MarriageLicenseEvent) PastPerfectWhat ¶
func (e *MarriageLicenseEvent) PastPerfectWhat() string
func (*MarriageLicenseEvent) PresentPerfectWhat ¶
func (e *MarriageLicenseEvent) PresentPerfectWhat() string
func (*MarriageLicenseEvent) ShortDescription ¶
func (e *MarriageLicenseEvent) ShortDescription() string
func (*MarriageLicenseEvent) SortsBefore ¶
func (e *MarriageLicenseEvent) SortsBefore(other TimelineEvent) bool
func (*MarriageLicenseEvent) Type ¶
func (e *MarriageLicenseEvent) Type() string
func (*MarriageLicenseEvent) What ¶
func (e *MarriageLicenseEvent) What() string
type MediaObject ¶
type MemorialEvent ¶
type MemorialEvent struct { GeneralEvent GeneralIndividualEvent }
MemorialEvent represents the memorial of a person in their timeline
func (*MemorialEvent) SortsBefore ¶
func (e *MemorialEvent) SortsBefore(other TimelineEvent) bool
func (*MemorialEvent) Type ¶
func (e *MemorialEvent) Type() string
func (*MemorialEvent) What ¶
func (e *MemorialEvent) What() string
type ModeOfDeath ¶
type ModeOfDeath string
const ( ModeOfDeathNatural ModeOfDeath = "" ModeOfDeathSuicide ModeOfDeath = "suicide" ModeOfDeathLostAtSea ModeOfDeath = "lost at sea" ModeOfDeathKilledInAction ModeOfDeath = "killed in action" ModeOfDeathDrowned ModeOfDeath = "drowned" ModeOfDeathExecuted ModeOfDeath = "executed" )
func (ModeOfDeath) ConditionalWhat ¶
func (m ModeOfDeath) ConditionalWhat(adverb string) string
func (ModeOfDeath) PassiveConditionalWhat ¶
func (m ModeOfDeath) PassiveConditionalWhat(adverb string) string
func (ModeOfDeath) PassiveWhat ¶
func (m ModeOfDeath) PassiveWhat() string
func (ModeOfDeath) PastPerfectWhat ¶
func (m ModeOfDeath) PastPerfectWhat() string
func (ModeOfDeath) PresentPerfectWhat ¶
func (m ModeOfDeath) PresentPerfectWhat() string
func (ModeOfDeath) What ¶
func (m ModeOfDeath) What() string
type MultipartyTimelineEvent ¶
type MultipartyTimelineEvent interface { TimelineEvent GetPrincipals() []*Person }
MultipartyTimelineEvent is a timeline event involving multiple principal parties.
type MusterEvent ¶
type MusterEvent struct { GeneralEvent GeneralMultipartyEvent }
MusterEvent represents the recording of a person in a muster call
func (*MusterEvent) ShortDescription ¶
func (e *MusterEvent) ShortDescription() string
func (*MusterEvent) Type ¶
func (e *MusterEvent) Type() string
type Name ¶
type Name struct { Name string Citations []*GeneralCitation }
type ObjectLink ¶
An ObjectLink is a specification of where to insert a link to an object in some text
type Occupation ¶
type Occupation struct { Date *Date StartDate *Date EndDate *Date Place *Place Name string // the name of the occupation, to be used in a sentence as `a {name}` Comment string // an explanatatory comment to be used alongside or as a footnote to the title Detail string Status OccupationStatus Group OccupationGroup Citations []*GeneralCitation Occurrences int Unknown bool }
func UnknownOccupation ¶
func UnknownOccupation() *Occupation
func (*Occupation) IsUnknown ¶
func (o *Occupation) IsUnknown() bool
func (*Occupation) String ¶
func (o *Occupation) String() string
type OccupationEvent ¶
type OccupationEvent struct { GeneralEvent GeneralIndividualEvent }
OccupationEvent represents the the recording of a person's occupation
func (*OccupationEvent) ShortDescription ¶
func (e *OccupationEvent) ShortDescription() string
func (*OccupationEvent) Type ¶
func (e *OccupationEvent) Type() string
type OccupationGroup ¶
type OccupationGroup string
OccupationGroup is the general class of the occupation
const ( OccupationGroupUnknown OccupationGroup = "" OccupationGroupLabouring OccupationGroup = "labouring" // ag lab OccupationGroupIndustrial OccupationGroup = "industrial" OccupationGroupMaritime OccupationGroup = "maritime" // seaman, mariner OccupationGroupCrafts OccupationGroup = "crafts" // carpenter, shoemaker etc OccupationGroupClerical OccupationGroup = "clerical" // clerk OccupationGroupCommercial OccupationGroup = "commercial" // baker, victualer, grocer, publican, dealer OccupationGroupMilitary OccupationGroup = "military" OccupationGroupPolice OccupationGroup = "police" // policeman, prison warder OccupationGroupService OccupationGroup = "service" // nurse, servant, valet, groom )
type OccupationStatus ¶
type OccupationStatus string
const ( OccupationStatusUnknown OccupationStatus = "" OccupationStatusRetired OccupationStatus = "retired" OccupationStatusFormer OccupationStatus = "former" OccupationStatusUnemployed OccupationStatus = "unemployed" OccupationStatusApprentice OccupationStatus = "apprentice" OccupationStatusJourneyman OccupationStatus = "journeyman" OccupationStatusMaster OccupationStatus = "master" )
func (OccupationStatus) String ¶
func (o OccupationStatus) String() string
type POV ¶
type POV struct { Person *Person // the person observing or experiencing the event Place *Place // the place in which the observing is taking place }
POV represents a point of view. It is used to provide contect when constructing a description of an event.
type Person ¶
type Person struct { ID string // canonical identifier Tags []string // tags to add to the person's page PreferredFullName string // full legal name PreferredGivenName string // name that can be used in prose, usually just the first name PreferredFamiliarName string // name that can be used in prose, usually just the first name or a nickname PreferredFamiliarFullName string // full name using just the first name or a nickname PreferredFamilyName string // family name, or surname PreferredSortName string // name organised for sorting, generally as surname, forenames PreferredUniqueName string // a name with additional uniquely identifying information such as years of birth and death or a numeric identifier NickName string // a name other than their given name that the are known by KnownNames []*Name // list of all known names FamilyNameGrouping string // the group of surnames this person's name is part of (e.g. Clarke/Clark), by default is the PreferredFamilyName Olb string // One line bio Gender Gender // male, female or unknown RelationToKeyPerson *Relation // optional relation to the key person in the tree Father *Person Mother *Person ParentFamily *Family // the family that this person is a child in Spouses []*Person // list of people this person was in a relationship with Children []*Person // list of people this person was considered a parent to Families []*Family // list of families this person participated in as a parent VitalYears string // best guess at year of birth and death in yyyy-yyyy format BestBirthlikeEvent IndividualTimelineEvent // event that best represents the person's birth BestDeathlikeEvent IndividualTimelineEvent // event that best represents the person's death Timeline []TimelineEvent BeingTense string // tense to use when refering to person: 'is' if they are possibly alive, 'was' if they are dead Historic bool // true if this person lived in a period more than a lifespan before the present (more than 120 years ago) PossiblyAlive bool // true if this person is possibly still alive, false if they are known to be dead or are historic DiedYoung bool // true if this person died before adulthood Unknown bool // true if this person is known to have existed but no other information is known Unmarried bool // true if it is known that the person did not marry Childless bool // true if it is known that the person did not have any children Illegitimate bool // true if it is known that the person was born illegitimately BornInWorkhouse bool // true if the birth place of the person was a workhouse DiedInWorkhouse bool // true if the death place of the person was a workhouse Pauper bool // true if the person was, at some stage, noted as a pauper Twin bool // true if it is known that the person was a twin Blind bool // true if it is known that the person was blind for the majority of their life Deaf bool // true if it is known that the person was deaf for the majority of their life PhysicalImpairment bool // true if it is known that the person was physically impaired for the majority of their life MentalImpairment bool // true if it is known that the person was mentally impaired for the majority of their life DiedInChildbirth bool // true if it is known that the person died in childbirth ModeOfDeath ModeOfDeath // mode of death, if known CauseOfDeath *Fact // cause of death, if known Publish bool // true if this person should always be included in the publish set Featured bool // true if this person is to be highlighted as a featured person on the tree overview Puzzle bool // true if this person is the centre of a significant puzzle Occupations []*Occupation // list of occupations PrimaryOccupation string // simple description of main occupation OccupationGroup OccupationGroup WikiTreeID string // the wikitree id of this person GrampsID string // the gramps id of this person Slug string // a short url-friendly identifier that can be used to refer to this person Links []Link // list of links to more information relevant to this person Redacted bool // true if the person's details should be redacted RedactionKeepsName bool // true if this person's name should be kept during redaction Inferences []Inference // list of inferences made Anomalies []*Anomaly // list of anomalies detected ToDos []*ToDo // list of todos detected MiscFacts []Fact // miscellaneous facts Associations []Association // general associations with other people such as godparent or twin FeatureImage *CitedMediaObject // an image that can be used to represent the person ResearchNotes []Text // research notes associated with this person Comments []Text // comments associated with this person Gallery []*CitedMediaObject // images and documents associated with the person LastUpdated *time.Time // time of last update }
func FilterPersonList ¶
func FilterPersonList(people []*Person, include PersonMatcher) []*Person
FilterPersonList returns a new slice that includes only the people that match the supplied PersonMatcher
func UnknownPerson ¶
func UnknownPerson() *Person
func (*Person) AgeInYearsAtDeath ¶
func (*Person) AllCitations ¶
func (p *Person) AllCitations() []*GeneralCitation
AllCitations returns a list of citations pertaining to this person
func (*Person) BestBirthDate ¶
func (*Person) BestDeathDate ¶
func (*Person) Generation ¶
Generation returns the generation from the key person, 0 means same generation, 1 means parent, -1 means child returns +1000 if no relation is known.
func (*Person) IsCloseToDirectAncestor ¶
IsCloseToDirectAncestor reports whether a person is a direct ancestor or a child or spouse of a direct ancestor.
func (*Person) IsDirectAncestor ¶
func (*Person) OccupationAt ¶
func (p *Person) OccupationAt(dt *Date) *Occupation
func (*Person) PreciseAgeAt ¶
func (p *Person) PreciseAgeAt(dt *Date) (*gdate.PreciseInterval, bool)
func (*Person) RedactNames ¶
func (*Person) RelationTo ¶
RelationTo returns a textual description of the relation of p to other. Returns an empty string if no relation was determined
func (*Person) RemoveDuplicateChildren ¶
func (p *Person) RemoveDuplicateChildren()
func (*Person) RemoveDuplicateFamilies ¶
func (p *Person) RemoveDuplicateFamilies()
func (*Person) RemoveDuplicateSpouses ¶
func (p *Person) RemoveDuplicateSpouses()
type PersonActionFunc ¶
type PersonMatcher ¶
func PersonDoesNotHaveCommonAncestor ¶
func PersonDoesNotHaveCommonAncestor() PersonMatcher
func PersonHasCommonAncestor ¶
func PersonHasCommonAncestor() PersonMatcher
func PersonHasResearchNotes ¶
func PersonHasResearchNotes() PersonMatcher
func PersonHasTag ¶
func PersonHasTag(tag string) PersonMatcher
func PersonIsCloseToDirectAncestor ¶
func PersonIsCloseToDirectAncestor() PersonMatcher
func PersonIsDirectAncestor ¶
func PersonIsDirectAncestor() PersonMatcher
func PersonIsFeatured ¶
func PersonIsFeatured() PersonMatcher
func PersonIsNotDirectAncestor ¶
func PersonIsNotDirectAncestor() PersonMatcher
func PersonIsPuzzle ¶
func PersonIsPuzzle() PersonMatcher
type Place ¶
type Place struct { ID string // canonical identifier Tags []string // tags to add to the place's page OriginalText string // the original text that was used to fill in the place information Hints []place.Hint Name string // the bare name of the place, could be street name or country name PreferredName string // the minimum amount of context, such as "street, locality" or "locality, region" PreferredUniqueName string // fully parsed name but with just enough extra context to make it unique PreferredFullName string // the fully parsed name PreferredSortName string // name organised for sorting, generally as a reverse hierarchy of country, region, locality PreferredLocalityName string // name excluding specific building or street, instead starting with locality, i.e. "locality, region" Parent *Place // the parent of this place in the administrative hierarchy PlaceType PlaceType // the type of place, such as "village", "town", "parish" Numbered bool // whether the place is a numbered building Singular bool // whether the place is a singular member of a group such as the register office or the barracks, not a named church. BuildingKind BuildingKind // the kind of building, such as "church", "workhouse" or "register office" Timeline []TimelineEvent Unknown bool // true if this place is known to have existed but no other information is known Links []Link // list of links to more information relevant to this place GeoLocation *GeoLocation // geographic location of the place CountryName *place.PlaceName UKNationName *place.PlaceName Kind place.PlaceKind // the kind of place - DEPRECATED ResearchNotes []Text // research notes associated with this place Comments []Text // comments associated with this place Gallery []*CitedMediaObject // images and documents associated with the place LastUpdated *time.Time // time of last update, if known }
func UnknownPlace ¶
func UnknownPlace() *Place
type PlaceMatcher ¶
func PlaceHasTag ¶
func PlaceHasTag(tag string) PlaceMatcher
type ProbateEvent ¶
type ProbateEvent struct { GeneralEvent GeneralIndividualEvent }
ProbateEvent represents the granting of probate for a person who has died
func (*ProbateEvent) ConditionalWhat ¶
func (e *ProbateEvent) ConditionalWhat(adverb string) string
func (*ProbateEvent) PassiveConditionalWhat ¶
func (e *ProbateEvent) PassiveConditionalWhat(adverb string) string
func (*ProbateEvent) PassiveWhat ¶
func (e *ProbateEvent) PassiveWhat() string
func (*ProbateEvent) PastPerfectWhat ¶
func (e *ProbateEvent) PastPerfectWhat() string
func (*ProbateEvent) PresentPerfectWhat ¶
func (e *ProbateEvent) PresentPerfectWhat() string
func (*ProbateEvent) ShortDescription ¶
func (e *ProbateEvent) ShortDescription() string
func (*ProbateEvent) Type ¶
func (e *ProbateEvent) Type() string
func (*ProbateEvent) What ¶
func (e *ProbateEvent) What() string
type PromotionEvent ¶
type PromotionEvent struct { GeneralEvent GeneralIndividualEvent }
Promotion represents the promotion of a person in their employment
func (*PromotionEvent) ShortDescription ¶
func (e *PromotionEvent) ShortDescription() string
func (*PromotionEvent) Type ¶
func (e *PromotionEvent) Type() string
type Relation ¶
type Relation struct { From *Person To *Person CommonAncestor *Person FromGenerations int // number of generations between the From person and CommonAncestor. 1 = common ancestor is parent of from ToGenerations int // number of generations between the To person and CommonAncestor. 1 = common ancestor is parent of to ClosestDirectRelation *Relation // if the To person does not share an ancestor with the From person, then this is the relation of From to a person who was the partner/spouse of a direct relation of To // ToSpouseGenerations int // number of generations between the To person and the spouse of SpouseRelation. 0 = spouse, 1 = parent of spouse SpouseRelation *Relation // the relationship of the To person to the spouse of the ClosestDirectRelation AncestorPath []*Person // the list of direct ancestors between From and To }
Relation describes the relationship between the From person and the To
func (*Relation) Distance ¶
Distance computes a score for how distant the relationship is. A self relationship has score 0, a parent/child/spouse has score 1 A direct ancestor scores 1 per generation step A direct descendant scores 1 per generation step A descendant of a common ancestor scores 1 per generation step to the common ancestor and 2 per generation down beyond the first A non-direct relationship doubles the score of the closest direct relationship
func (*Relation) ExtendToChild ¶
ExtendToChild produces a new relationship extended to the child of the To person
func (*Relation) ExtendToParent ¶
ExtendToParent produces a new relationship extended to the parent of the To person
func (*Relation) ExtendToSpouse ¶
ExtendToSpouse produces a new relationship extended to the spouse of the To person
func (*Relation) HasCommonAncestor ¶
HasCommonAncestor reports whether the From and To person have a common ancestor, including if the To person is a direct ancestor of the From person
func (*Relation) IsCloseToDirectAncestor ¶
IsCloseToDirectAncestor reports whether To person is a direct ancestor or a child or spouse of the From person.
func (*Relation) IsDirectAncestor ¶
IsDirectAncestor reports whether the To person is a direct ancestor of the From person
func (*Relation) IsDirectDescendant ¶
IsDirectDescendant reports whether the To person is a direct descendant of the From person
func (*Relation) Name ¶
Name returns the name of the relation between From and To, in the form that "To is the Name() of From"
func (*Relation) Path ¶
Path returns a list of people that comprise the shortest path to reach the To person from the From person. The list will always contain at least one person (the From person) for a non-nil Relation. The first entry in a populated list will be the From person, the last entry will be the To person.
type Repository ¶
type RepositoryRef ¶
type RepositoryRef struct { Repository *Repository CallNo string }
type ResidenceRecordedEvent ¶
type ResidenceRecordedEvent struct { GeneralEvent GeneralMultipartyEvent }
ResidenceRecordedEvent represents the event of a person's residence being recorded / noted
func (*ResidenceRecordedEvent) GetTitle ¶
func (e *ResidenceRecordedEvent) GetTitle() string
func (*ResidenceRecordedEvent) ShortDescription ¶
func (e *ResidenceRecordedEvent) ShortDescription() string
func (*ResidenceRecordedEvent) Type ¶
func (e *ResidenceRecordedEvent) Type() string
func (*ResidenceRecordedEvent) What ¶
func (e *ResidenceRecordedEvent) What() string
type SaleOfPropertyEvent ¶
type SaleOfPropertyEvent struct { GeneralEvent GeneralIndividualEvent }
SaleOfPropertyEvent represents the sale of some property person in their timeline
func (*SaleOfPropertyEvent) ShortDescription ¶
func (e *SaleOfPropertyEvent) ShortDescription() string
func (*SaleOfPropertyEvent) Type ¶
func (e *SaleOfPropertyEvent) Type() string
func (*SaleOfPropertyEvent) What ¶
func (e *SaleOfPropertyEvent) What() string
type Source ¶
type Source struct { ID string // canonical id Unknown bool // true if this source is known to have existed but no other information is known Title string Author string SearchLink string // link to online search interface RepositoryName string RepositoryLink string RepositoryRefs []RepositoryRef EventsCiting []TimelineEvent Tags []string IsCivilRegistration bool // indicates whether this source holds civil registration records such as births marriages and deaths IsCensus bool // indicates whether this source holds census records IsUnreliable bool // indicates whether this source is of dubious reliability }
type Timeline ¶
type Timeline struct {
Events []TimelineEvent
}
type TimelineEvent ¶
type TimelineEvent interface { GetDate() *Date GetPlace() *Place GetDetail() string GetNarrative() Text GetCitations() []*GeneralCitation GetAttribute(name string) (string, bool) Type() string // name of the type of event, usually a single word What() string // text description of what happened, an active verb in the past tense, such as married, born, died When() string // text description of date Where() string // text description of place IsInferred() bool // whether or not the event was inferred to exist, i.e. has no supporting evidence DirectlyInvolves(p *Person) bool // whether or not the event directly involves a person as a principal or party GetParticipants() []*EventParticipant GetParticipantsByRole(EventRole) []*EventParticipant }
func CollapseEventList ¶
func CollapseEventList(evs []TimelineEvent) []TimelineEvent
CollapseEventList returns a new slice that includes only unique events
func FilterEventList ¶
func FilterEventList(evs []TimelineEvent, include EventMatcher) []TimelineEvent
FilterEventList returns a new slice that includes only the events that match the supplied EventMatcher
type ToDo ¶
type ToDo struct { Category ToDoCategory Context string Goal string Reason string }
A ToDo is a task or loose end for an area of research
type ToDoCategory ¶
type ToDoCategory string
const ( ToDoCategoryCitations ToDoCategory = "Citation" ToDoCategoryMissing ToDoCategory = "Missing Information" ToDoCategoryRecords ToDoCategory = "Records" )
func (ToDoCategory) String ¶
func (c ToDoCategory) String() string
type UnionTimelineEvent ¶
type UnionTimelineEvent interface { TimelineEvent GetHusband() *Person GetWife() *Person GetOther(p *Person) *Person // returns the first of party1 or party2 that is not p }
UnionTimelineEvent is a timeline event involving the union of two parties.
type WillEvent ¶
type WillEvent struct { GeneralEvent GeneralIndividualEvent }
WillEvent represents the writing of a will by a person in their timeline