Documentation
¶
Index ¶
- Constants
- func AbbrevWhatWhen(ev TimelineEvent) string
- func AbbrevWhatWhenWhere(ev TimelineEvent) string
- func AbbrevWhen(ev TimelineEvent) string
- func AbbrevWhenWhere(ev TimelineEvent) string
- func AbbrevWhere(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 MatchPersonList(people []*Person, match PersonMatcher) bool
- func NormalizeGrampsID(id string) string
- 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 SortCitationsBySourceQuality(cits []*GeneralCitation)
- 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) AddParticipant(ep *EventParticipant)
- func (e *CensusEvent) DirectlyInvolves(p *Person) bool
- func (e *CensusEvent) Entry(p *Person) (*CensusEntry, bool)
- func (e *CensusEvent) GetParticipant(p *Person) []*EventParticipant
- func (e *CensusEvent) GetParticipants() []*EventParticipant
- func (e *CensusEvent) GetParticipantsByRole(r EventRole) []*EventParticipant
- func (e *CensusEvent) Head() *Person
- func (e *CensusEvent) IsParticipant(p *Person) bool
- 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 ConvictionEvent
- type CourtEvent
- 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) Gedcom() string
- 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
- func (e *EconomicStatusEvent) ConditionalWhat(adverb string) string
- func (e *EconomicStatusEvent) PassiveConditionalWhat(adverb string) string
- func (e *EconomicStatusEvent) PassiveWhat() string
- func (e *EconomicStatusEvent) PastPerfectWhat() string
- func (e *EconomicStatusEvent) PresentPerfectWhat() string
- func (e *EconomicStatusEvent) ShortDescription() string
- func (e *EconomicStatusEvent) Type() string
- type EnlistmentEvent
- type EventDateType
- type EventMatcher
- func AfterEvent(cutoff TimelineEvent) EventMatcher
- func IsOwnBaptismEvent(p *Person) EventMatcher
- func IsOwnBirthEvent(p *Person) EventMatcher
- func IsOwnBurialEvent(p *Person) EventMatcher
- func IsOwnDeathEvent(p *Person) EventMatcher
- func IsOwnPossibleBirthEvent(p *Person) EventMatcher
- func IsOwnPossibleDeathEvent(p *Person) EventMatcher
- func IsOwnVitalEvent(p *Person) EventMatcher
- func IsVitalEvent(p *Person) EventMatcher
- type EventParticipant
- type EventRole
- type Fact
- type Family
- type FamilyLine
- 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) Created() (time.Time, bool)
- 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) GetMediaObjects() []*CitedMediaObject
- 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) Updated() (time.Time, bool)
- func (e *GeneralEvent) What() string
- func (e *GeneralEvent) When() string
- func (e *GeneralEvent) Where() string
- type GeneralIndividualEvent
- func (e *GeneralIndividualEvent) AddParticipant(ep *EventParticipant)
- func (e *GeneralIndividualEvent) DirectlyInvolves(p *Person) bool
- func (e *GeneralIndividualEvent) GetParticipant(p *Person) []*EventParticipant
- func (e *GeneralIndividualEvent) GetParticipants() []*EventParticipant
- func (e *GeneralIndividualEvent) GetParticipantsByRole(r EventRole) []*EventParticipant
- func (e *GeneralIndividualEvent) GetPrincipal() *Person
- func (e *GeneralIndividualEvent) IsParticipant(p *Person) bool
- type GeneralMultipartyEvent
- func (e *GeneralMultipartyEvent) AddParticipant(ep *EventParticipant)
- func (e *GeneralMultipartyEvent) DirectlyInvolves(p *Person) bool
- func (e *GeneralMultipartyEvent) GetParticipant(p *Person) []*EventParticipant
- func (e *GeneralMultipartyEvent) GetParticipants() []*EventParticipant
- func (e *GeneralMultipartyEvent) GetParticipantsByRole(r EventRole) []*EventParticipant
- func (e *GeneralMultipartyEvent) GetPrincipals() []*Person
- func (e *GeneralMultipartyEvent) IsParticipant(p *Person) bool
- type GeneralUnionEvent
- func (e *GeneralUnionEvent) AddParticipant(ep *EventParticipant)
- func (e *GeneralUnionEvent) DirectlyInvolves(p *Person) bool
- func (e *GeneralUnionEvent) GetHusband() *Person
- func (e *GeneralUnionEvent) GetOther(p *Person) *Person
- func (e *GeneralUnionEvent) GetParticipant(p *Person) []*EventParticipant
- func (e *GeneralUnionEvent) GetParticipants() []*EventParticipant
- func (e *GeneralUnionEvent) GetParticipantsByRole(r EventRole) []*EventParticipant
- func (e *GeneralUnionEvent) GetWife() *Person
- func (e *GeneralUnionEvent) IsParticipant(p *Person) bool
- type GeoLocation
- type ImmigrationEvent
- type IndividualNarrativeEvent
- type IndividualTimelineEvent
- type Inference
- type InquestEvent
- type InstitutionDepartureEvent
- type InstitutionEntryEvent
- type Interval
- type IrregularWhater
- type Link
- type LinkCategory
- 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 NamingEvent
- type NumberOfChildren
- type ObjectLink
- type Occupation
- type OccupationEvent
- func (e *OccupationEvent) ConditionalWhat(adverb string) string
- func (e *OccupationEvent) PassiveConditionalWhat(adverb string) string
- func (e *OccupationEvent) PassiveWhat() string
- func (e *OccupationEvent) PastPerfectWhat() string
- func (e *OccupationEvent) PresentPerfectWhat() string
- func (e *OccupationEvent) ShortDescription() string
- func (e *OccupationEvent) Type() string
- func (e *OccupationEvent) What() string
- 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) Created() (time.Time, bool)
- func (p *Person) Generation() int
- func (p *Person) IsCloseToDirectAncestor() bool
- func (p *Person) IsDirectAncestor() bool
- func (p *Person) IsUnknown() bool
- func (p *Person) LogValue() slog.Value
- 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
- func (p *Person) Updated() (time.Time, 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 PhysicalDescriptionEvent
- func (e *PhysicalDescriptionEvent) ConditionalWhat(adverb string) string
- func (e *PhysicalDescriptionEvent) PassiveConditionalWhat(adverb string) string
- func (e *PhysicalDescriptionEvent) PassiveWhat() string
- func (e *PhysicalDescriptionEvent) PastPerfectWhat() string
- func (e *PhysicalDescriptionEvent) PresentPerfectWhat() string
- func (e *PhysicalDescriptionEvent) ShortDescription() string
- func (e *PhysicalDescriptionEvent) Type() string
- func (e *PhysicalDescriptionEvent) What() string
- type Place
- func (p *Place) Created() (time.Time, bool)
- func (p *Place) DescriptivePrefix() string
- func (p *Place) Hierarchy() []*Place
- func (p *Place) InAt() string
- func (p *Place) IsUnknown() bool
- func (p *Place) SameAs(other *Place) bool
- func (p *Place) SameCountry(other *Place) bool
- func (p *Place) SameRegion(other *Place) bool
- func (p *Place) Updated() (time.Time, bool)
- func (p *Place) Where() string
- type PlaceMatcher
- type PlaceType
- type PossibleBirthEvent
- type PossibleDeathEvent
- 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 ReceivedIntoCommunionEvent
- 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
- func (e *ResidenceRecordedEvent) ConditionalWhat(adverb string) string
- func (e *ResidenceRecordedEvent) GetTitle() string
- func (e *ResidenceRecordedEvent) PassiveConditionalWhat(adverb string) string
- func (e *ResidenceRecordedEvent) PassiveWhat() string
- func (e *ResidenceRecordedEvent) PastPerfectWhat() string
- func (e *ResidenceRecordedEvent) PresentPerfectWhat() string
- func (e *ResidenceRecordedEvent) ShortDescription() string
- func (e *ResidenceRecordedEvent) Type() string
- func (e *ResidenceRecordedEvent) What() string
- type SaleOfPropertyEvent
- type SeparationEvent
- type Source
- type SourceQuality
- 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" EventAttributePrivateBaptism = "private baptism" )
const ( FactCategoryAKA = "Also known as" FactCategoryMilitaryServiceNumber = "Military service number" FactCategorySeamansTicket = "Seaman's ticket" FactCategoryCauseOfDeath = "Cause of death" FactCategoryLiteracy = "Literacy" )
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" PlaceTypeNation = "nation" // nation is a place with national identity within a country // PlaceTypeTerritory = "territory" // maybe territory is a place associated with a country but is not goverened by it (early New Mexico/Texas?) PlaceTypeArchipelago = "archipelago" // a group of islands that is part of a 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" PlaceTypeState = "county" PlaceTypeRegistrationDistrict = "registration district" PlaceTypeProbateOffice = "probate office" )
const ( BuildingKindNone = "" BuildingKindChurch = "church" BuildingKindWorkhouse = "workhouse" BuildingKindRegisterOffice = "register office" BuildingKindFarm = "farm" BuildingKindHospital = "hospital" )
const MaxDistance = 1000
const UnknownPlaceName = "unknown"
Variables ¶
This section is empty.
Functions ¶
func AbbrevWhatWhen ¶
func AbbrevWhatWhen(ev TimelineEvent) string
func AbbrevWhatWhenWhere ¶
func AbbrevWhatWhenWhere(ev TimelineEvent) string
func AbbrevWhen ¶ added in v0.0.3
func AbbrevWhen(ev TimelineEvent) string
func AbbrevWhenWhere ¶ added in v0.0.3
func AbbrevWhenWhere(ev TimelineEvent) string
func AbbrevWhere ¶ added in v0.0.3
func AbbrevWhere(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. This is a depth-first traversal, following the paternal line.
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 MatchPersonList ¶ added in v0.0.3
func MatchPersonList(people []*Person, match PersonMatcher) bool
MatchPersonList reports whether any person matches the supplied PersonMatcher
func NormalizeGrampsID ¶ added in v0.0.3
NormalizeGrampsID normalizes a gramps id by removing any leading zeroes after the prefix character
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 SortCitationsBySourceQuality ¶ added in v0.0.3
func SortCitationsBySourceQuality(cits []*GeneralCitation)
SortCitationsBySourceQuality sorts citations in place by the quality of their source in order: primary, secondary, tertiary, unknown. Sources marked as unreliable are sorted last.
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" AssociationKindDNA AssociationKind = "DNA" )
type BaptismEvent ¶
type BaptismEvent struct {
GeneralEvent
GeneralIndividualEvent
Private bool // true if the baptism was performed privately
}
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) AddParticipant ¶ added in v0.0.3
func (e *CensusEvent) AddParticipant(ep *EventParticipant)
func (*CensusEvent) DirectlyInvolves ¶
func (e *CensusEvent) DirectlyInvolves(p *Person) bool
func (*CensusEvent) Entry ¶
func (e *CensusEvent) Entry(p *Person) (*CensusEntry, bool)
func (*CensusEvent) GetParticipant ¶ added in v0.0.3
func (e *CensusEvent) GetParticipant(p *Person) []*EventParticipant
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) IsParticipant ¶ added in v0.0.3
func (e *CensusEvent) IsParticipant(p *Person) bool
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 ConvictionEvent ¶ added in v0.0.3
type ConvictionEvent struct {
GeneralEvent
GeneralIndividualEvent
Crime string
}
ConvictionEvent represents the conviction of a person for a crime
func (*ConvictionEvent) ShortDescription ¶ added in v0.0.3
func (e *ConvictionEvent) ShortDescription() string
func (*ConvictionEvent) Type ¶ added in v0.0.3
func (e *ConvictionEvent) Type() string
func (*ConvictionEvent) What ¶ added in v0.0.3
func (e *ConvictionEvent) What() string
type CourtEvent ¶ added in v0.0.3
type CourtEvent struct {
GeneralEvent
GeneralIndividualEvent
}
CourtEvent represents the appearance of a person in a court or a court hearing they are involved in
func (*CourtEvent) ShortDescription ¶ added in v0.0.3
func (e *CourtEvent) ShortDescription() string
func (*CourtEvent) Type ¶ added in v0.0.3
func (e *CourtEvent) Type() string
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
// Span indicates whether this date is a span of time
// when true the date represents a span of time during which something continuously occurred (such as a residing at an address)
// when false it represents a range of time during which a discrete event occurred
Span bool
}
func BeforeYear ¶
func PreciseDate ¶
func UnknownDate ¶
func UnknownDate() *Date
func WithinDecade ¶
func YearRange ¶
YearRange returns a date that represents a range of time between two years, including the upper and lower year.
func YearSpan ¶ added in v0.0.3
YearSpan returns a date that represents a span of time between two years, including the upper and lower year.
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
Status string
}
EconomicStatusEvent represents the economic status of a person
func (*EconomicStatusEvent) ConditionalWhat ¶ added in v0.0.3
func (e *EconomicStatusEvent) 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"
func (*EconomicStatusEvent) PassiveConditionalWhat ¶ added in v0.0.3
func (e *EconomicStatusEvent) 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"
func (*EconomicStatusEvent) PassiveWhat ¶ added in v0.0.3
func (e *EconomicStatusEvent) PassiveWhat() string
text description of what happened, a passive verb in the past tense, such as "was married", "was born", "died"
func (*EconomicStatusEvent) PastPerfectWhat ¶ added in v0.0.3
func (e *EconomicStatusEvent) PastPerfectWhat() string
text description of what happened, a passive verb in the past perfect tense, such as "had been married", "had died"
func (*EconomicStatusEvent) PresentPerfectWhat ¶ added in v0.0.3
func (e *EconomicStatusEvent) 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"
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
var IsBaptismEvent EventMatcher = func(ev TimelineEvent) bool { _, ok := ev.(*BaptismEvent) return ok }
var IsBirthEvent EventMatcher = func(ev TimelineEvent) bool { _, ok := ev.(*BirthEvent) return ok }
var IsBurialEvent EventMatcher = func(ev TimelineEvent) bool { _, ok := ev.(*BurialEvent) return ok }
var IsDeathEvent EventMatcher = func(ev TimelineEvent) bool { _, ok := ev.(*DeathEvent) return ok }
func AfterEvent ¶ added in v0.0.3
func AfterEvent(cutoff TimelineEvent) EventMatcher
func IsOwnBaptismEvent ¶ added in v0.0.3
func IsOwnBaptismEvent(p *Person) EventMatcher
func IsOwnBirthEvent ¶ added in v0.0.3
func IsOwnBirthEvent(p *Person) EventMatcher
func IsOwnBurialEvent ¶ added in v0.0.3
func IsOwnBurialEvent(p *Person) EventMatcher
func IsOwnDeathEvent ¶ added in v0.0.3
func IsOwnDeathEvent(p *Person) EventMatcher
func IsOwnPossibleBirthEvent ¶ added in v0.0.6
func IsOwnPossibleBirthEvent(p *Person) EventMatcher
func IsOwnPossibleDeathEvent ¶ added in v0.0.6
func IsOwnPossibleDeathEvent(p *Person) EventMatcher
func IsOwnVitalEvent ¶ added in v0.0.3
func IsOwnVitalEvent(p *Person) EventMatcher
func IsVitalEvent ¶ added in v0.0.3
func IsVitalEvent(p *Person) EventMatcher
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 EventRoleAdministrator EventRole = "administrator" // adminstrator of a probate EventRoleInformant EventRole = "informant" )
type Fact ¶
type Fact struct {
Category string
Detail string
Comment string // an explanatory comment to be used alongside or as a footnote to the detail
Text Text
Citations []*GeneralCitation
}
func ParseCauseOfDeathFact ¶
func ParseCauseOfDeathFact(text string, citations []*GeneralCitation) *Fact
type Family ¶
type Family struct {
ID string // canonical id
Tags []string // tags to add to the family's page
PreferredUniqueName string // name used to identify the family
PreferredFullName string // full name using full legal names of parents in family
PreferredFamiliarName string // name that can be used in prose, usually just the first name of each parent
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
NumberOfChildren NumberOfChildren
AllChildrenKnown bool // true if the list of children should be considered a complete list
PublishChildren bool // true if this family's children should always be included in the publish set
Unknown bool
}
func (*Family) OtherParent ¶
type FamilyLine ¶ added in v0.0.3
type FamilyLine struct {
ID string // TODO
Name string
Families []*Family
Lineage []*Person // list of people in the family line for each family (usually the male)
}
A FamilyLine is a line of descent down to the last male of the line
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
UpdateTime *time.Time // time of last update, if known
CreateTime *time.Time // time of creation
}
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) Created ¶ added in v0.0.3
func (c *GeneralCitation) Created() (time.Time, bool)
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
MediaObjects []*CitedMediaObject
UpdateTime *time.Time // time of last update, if known
CreateTime *time.Time // time of creation if known
}
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) GetMediaObjects ¶ added in v0.0.3
func (e *GeneralEvent) GetMediaObjects() []*CitedMediaObject
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
Participants []*EventParticipant
}
GeneralPartyEvent is a general event involving one individual.
func (*GeneralIndividualEvent) AddParticipant ¶ added in v0.0.3
func (e *GeneralIndividualEvent) AddParticipant(ep *EventParticipant)
func (*GeneralIndividualEvent) DirectlyInvolves ¶
func (e *GeneralIndividualEvent) DirectlyInvolves(p *Person) bool
func (*GeneralIndividualEvent) GetParticipant ¶ added in v0.0.3
func (e *GeneralIndividualEvent) GetParticipant(p *Person) []*EventParticipant
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
func (*GeneralIndividualEvent) IsParticipant ¶ added in v0.0.3
func (e *GeneralIndividualEvent) IsParticipant(p *Person) bool
type GeneralMultipartyEvent ¶
type GeneralMultipartyEvent struct {
Participants []*EventParticipant
}
GeneralMultipartyEvent is a general event involving multiple parties.
func (*GeneralMultipartyEvent) AddParticipant ¶ added in v0.0.3
func (e *GeneralMultipartyEvent) AddParticipant(ep *EventParticipant)
func (*GeneralMultipartyEvent) DirectlyInvolves ¶
func (e *GeneralMultipartyEvent) DirectlyInvolves(p *Person) bool
func (*GeneralMultipartyEvent) GetParticipant ¶ added in v0.0.3
func (e *GeneralMultipartyEvent) GetParticipant(p *Person) []*EventParticipant
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
func (*GeneralMultipartyEvent) IsParticipant ¶ added in v0.0.3
func (e *GeneralMultipartyEvent) IsParticipant(p *Person) bool
type GeneralUnionEvent ¶
type GeneralUnionEvent struct {
Husband *Person
Wife *Person
Participants []*EventParticipant
}
GeneralUnionEvent is a general event involving the union of two parties.
func (*GeneralUnionEvent) AddParticipant ¶ added in v0.0.3
func (e *GeneralUnionEvent) AddParticipant(ep *EventParticipant)
func (*GeneralUnionEvent) DirectlyInvolves ¶
func (e *GeneralUnionEvent) DirectlyInvolves(p *Person) bool
func (*GeneralUnionEvent) GetHusband ¶
func (e *GeneralUnionEvent) GetHusband() *Person
func (*GeneralUnionEvent) GetOther ¶
func (e *GeneralUnionEvent) GetOther(p *Person) *Person
func (*GeneralUnionEvent) GetParticipant ¶ added in v0.0.3
func (e *GeneralUnionEvent) GetParticipant(p *Person) []*EventParticipant
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) IsParticipant ¶ added in v0.0.3
func (e *GeneralUnionEvent) IsParticipant(p *Person) bool
type GeoLocation ¶
type ImmigrationEvent ¶ added in v0.0.3
type ImmigrationEvent struct {
GeneralEvent
GeneralIndividualEvent
}
ImmigrationEvent represents the immigration of a person to a new country of residence
func (*ImmigrationEvent) ShortDescription ¶ added in v0.0.3
func (e *ImmigrationEvent) ShortDescription() string
func (*ImmigrationEvent) Type ¶ added in v0.0.3
func (e *ImmigrationEvent) Type() string
func (*ImmigrationEvent) What ¶ added in v0.0.3
func (e *ImmigrationEvent) What() string
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 InquestEvent ¶ added in v0.0.3
type InquestEvent struct {
GeneralEvent
GeneralIndividualEvent
}
InquestEvent represents an inquest held into the death of a person
func (*InquestEvent) ShortDescription ¶ added in v0.0.3
func (e *InquestEvent) ShortDescription() string
func (*InquestEvent) SortsBefore ¶ added in v0.0.3
func (e *InquestEvent) SortsBefore(other TimelineEvent) bool
func (*InquestEvent) Type ¶ added in v0.0.3
func (e *InquestEvent) Type() string
func (*InquestEvent) What ¶ added in v0.0.3
func (e *InquestEvent) What() string
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 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 LinkCategory ¶ added in v0.0.3
type LinkCategory string
const ( LinkCategoryUnknown LinkCategory = "" LinkCategoryDiary LinkCategory = "diary" LinkCategoryStorySubject LinkCategory = "story-subject" LinkCategoryStoryMention LinkCategory = "story-mention" LinkCategoryQuestionSubject LinkCategory = "question-subject" LinkCategoryQuestionMention LinkCategory = "question-mention" LinkCategoryWebsite LinkCategory = "website" )
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" ModeOfDeathChildbirth ModeOfDeath = "childbirth" ModeOfDeathAccidental ModeOfDeath = "accidental" ModeOfDeathAtSea ModeOfDeath = "at sea" )
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 NamingEvent ¶ added in v0.0.3
type NamingEvent struct {
GeneralEvent
GeneralIndividualEvent
}
NamingEvent represents the naming of a person in their timeline
func (*NamingEvent) ShortDescription ¶ added in v0.0.3
func (e *NamingEvent) ShortDescription() string
func (*NamingEvent) SortsBefore ¶ added in v0.0.3
func (e *NamingEvent) SortsBefore(other TimelineEvent) bool
func (*NamingEvent) Type ¶ added in v0.0.3
func (e *NamingEvent) Type() string
func (*NamingEvent) What ¶ added in v0.0.3
func (e *NamingEvent) What() string
type NumberOfChildren ¶ added in v0.0.3
type NumberOfChildren string
const NumberOfChildrenUnknown NumberOfChildren = ""
func ParseNumberOfChildren ¶ added in v0.0.3
func ParseNumberOfChildren(v string) (NumberOfChildren, error)
func (NumberOfChildren) IsLowerBound ¶ added in v0.0.3
func (n NumberOfChildren) IsLowerBound() bool
func (NumberOfChildren) IsUnknown ¶ added in v0.0.3
func (n NumberOfChildren) IsUnknown() bool
func (NumberOfChildren) IsZero ¶ added in v0.0.3
func (n NumberOfChildren) IsZero() bool
func (NumberOfChildren) Number ¶ added in v0.0.3
func (n NumberOfChildren) Number() int
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
Occupation Occupation
}
OccupationEvent represents the the recording of a person's occupation
func (*OccupationEvent) ConditionalWhat ¶ added in v0.0.3
func (e *OccupationEvent) 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"
func (*OccupationEvent) PassiveConditionalWhat ¶ added in v0.0.3
func (e *OccupationEvent) 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"
func (*OccupationEvent) PassiveWhat ¶ added in v0.0.3
func (e *OccupationEvent) PassiveWhat() string
text description of what happened, a passive verb in the past tense, such as "was married", "was born", "died"
func (*OccupationEvent) PastPerfectWhat ¶ added in v0.0.3
func (e *OccupationEvent) PastPerfectWhat() string
text description of what happened, a passive verb in the past perfect tense, such as "had been married", "had died"
func (*OccupationEvent) PresentPerfectWhat ¶ added in v0.0.3
func (e *OccupationEvent) 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"
func (*OccupationEvent) ShortDescription ¶
func (e *OccupationEvent) ShortDescription() string
func (*OccupationEvent) Type ¶
func (e *OccupationEvent) Type() string
func (*OccupationEvent) What ¶ added in v0.0.3
func (e *OccupationEvent) What() 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
Family *Family // the family observing or experiencing the event
}
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
NativeID string // identifier in database this person was found in
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 the first names without the family name
PreferredFamiliarName string // name that can be used in prose, usually just the first name or a nickname plus family name
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
Epithet string // Short epithet or descriptor phrase
Olb string // One line bio, longer than the epithet
Bio string // Plain text biography
Notable string // A notable fact about the person
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
Unidentified bool // true if no name is known for this person
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
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
OccupationGroup OccupationGroup
WikiTreeID string // the wikitree id of this person
GrampsID string // the gramps id of this person (normalized to remove any leading zeros)
FamilySearchID string // the familysearch 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
Intro *Text // introductory note associated with this person
UpdateTime *time.Time // time of last update
CreateTime *time.Time // time of creation
}
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 PhysicalDescriptionEvent ¶ added in v0.0.3
type PhysicalDescriptionEvent struct {
GeneralEvent
GeneralIndividualEvent
Description string
}
PhysicalDescriptionEvent represents the economic status of a person
func (*PhysicalDescriptionEvent) ConditionalWhat ¶ added in v0.0.3
func (e *PhysicalDescriptionEvent) 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"
func (*PhysicalDescriptionEvent) PassiveConditionalWhat ¶ added in v0.0.3
func (e *PhysicalDescriptionEvent) 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"
func (*PhysicalDescriptionEvent) PassiveWhat ¶ added in v0.0.3
func (e *PhysicalDescriptionEvent) PassiveWhat() string
text description of what happened, a passive verb in the past tense, such as "was married", "was born", "died"
func (*PhysicalDescriptionEvent) PastPerfectWhat ¶ added in v0.0.3
func (e *PhysicalDescriptionEvent) PastPerfectWhat() string
text description of what happened, a passive verb in the past perfect tense, such as "had been married", "had died"
func (*PhysicalDescriptionEvent) PresentPerfectWhat ¶ added in v0.0.3
func (e *PhysicalDescriptionEvent) 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"
func (*PhysicalDescriptionEvent) ShortDescription ¶ added in v0.0.3
func (e *PhysicalDescriptionEvent) ShortDescription() string
func (*PhysicalDescriptionEvent) Type ¶ added in v0.0.3
func (e *PhysicalDescriptionEvent) Type() string
func (*PhysicalDescriptionEvent) What ¶ added in v0.0.3
func (e *PhysicalDescriptionEvent) What() string
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
FullName string // the name including the hierarchy of places it belongs to, comma separated
ProseName string // the name including the hierarchy of places it belongs to, comma separated with parts qualified by their type such as "St. Martins Church in the parish of Fressingfield, in Suffolk, England"
NameWithDistrict string // the name of the place with context such as town or parish
NameWithRegion string // the name of the place with locality and region, such as county
NameWithCountry string // the name of the place with locality, region and country
FullContext string // the full hierarchy of places this place belongs to, comma separated, no leading comma
DistrictContext string // an edited hierarchy of places this place belongs to up to the district, comma separated, no leading comma
RegionContext string // an edited hierarchy of places this place belongs to up to the region, comma separated, no leading comma
CountryContext string // an edited hierarchy of places this place belongs to up to the country, comma separated, no leading comma
PreferredSortName string // name organised for sorting, generally as a reverse hierarchy of country, region, locality
Adjective string // the adjective used to describe things of this place, e.g. "Norwegian" or "Irish"
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
Country *Place // Country is the place lowest in the parent hierarchy that has the type of country
Region *Place // Region is the regional place lowest in the parent hierarchy below the country, such as state, county, nation, island, archipelago etc.
District *Place // District is the populated place lowest in the parent hierarchy below the region level, such as a parish, town, village etc.
CountryName *place.PlaceName
UKNationName *place.PlaceName
ResearchNotes []Text // research notes associated with this place
Comments []Text // comments associated with this place
Gallery []*CitedMediaObject // images and documents associated with the place
UpdateTime *time.Time // time of last update, if known
CreateTime *time.Time // time of creation
}
func UnknownPlace ¶
func UnknownPlace() *Place
func (*Place) DescriptivePrefix ¶ added in v0.0.3
func (*Place) Hierarchy ¶ added in v0.0.3
Hierarchy returns the list of places that form the full hierachy for this place. The first entry is p, the next entry is p's parent, the next entry is p's grandparent and so on. The list walways contains at least one element, which will be op itself.
func (*Place) SameCountry ¶ added in v0.0.3
func (*Place) SameRegion ¶ added in v0.0.3
type PlaceMatcher ¶
func PlaceHasTag ¶
func PlaceHasTag(tag string) PlaceMatcher
type PossibleBirthEvent ¶ added in v0.0.3
type PossibleBirthEvent struct {
GeneralEvent
GeneralIndividualEvent
}
PossibleBirthEvent represents an indirect and unproven record of the birth of a person in their timeline
func (*PossibleBirthEvent) ShortDescription ¶ added in v0.0.3
func (e *PossibleBirthEvent) ShortDescription() string
func (*PossibleBirthEvent) SortsBefore ¶ added in v0.0.3
func (e *PossibleBirthEvent) SortsBefore(other TimelineEvent) bool
func (*PossibleBirthEvent) Type ¶ added in v0.0.3
func (e *PossibleBirthEvent) Type() string
func (*PossibleBirthEvent) What ¶ added in v0.0.3
func (e *PossibleBirthEvent) What() string
type PossibleDeathEvent ¶ added in v0.0.3
type PossibleDeathEvent struct {
GeneralEvent
GeneralIndividualEvent
}
PossibleDeathEvent represents an indirect and unproven record of the death of a person in their timeline
func (*PossibleDeathEvent) ShortDescription ¶ added in v0.0.3
func (e *PossibleDeathEvent) ShortDescription() string
func (*PossibleDeathEvent) SortsBefore ¶ added in v0.0.3
func (e *PossibleDeathEvent) SortsBefore(other TimelineEvent) bool
func (*PossibleDeathEvent) Type ¶ added in v0.0.3
func (e *PossibleDeathEvent) Type() string
func (*PossibleDeathEvent) What ¶ added in v0.0.3
func (e *PossibleDeathEvent) What() string
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 ReceivedIntoCommunionEvent ¶ added in v0.0.3
type ReceivedIntoCommunionEvent struct {
GeneralEvent
GeneralIndividualEvent
}
ReceivedIntoCommunionEvent represents the public reception into the church of a person who was privately baptised
func (*ReceivedIntoCommunionEvent) ShortDescription ¶ added in v0.0.3
func (e *ReceivedIntoCommunionEvent) ShortDescription() string
func (*ReceivedIntoCommunionEvent) SortsBefore ¶ added in v0.0.3
func (e *ReceivedIntoCommunionEvent) SortsBefore(other TimelineEvent) bool
func (*ReceivedIntoCommunionEvent) Type ¶ added in v0.0.3
func (e *ReceivedIntoCommunionEvent) Type() string
func (*ReceivedIntoCommunionEvent) What ¶ added in v0.0.3
func (e *ReceivedIntoCommunionEvent) What() 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) ConditionalWhat ¶ added in v0.0.3
func (e *ResidenceRecordedEvent) ConditionalWhat(adverb string) string
func (*ResidenceRecordedEvent) GetTitle ¶
func (e *ResidenceRecordedEvent) GetTitle() string
func (*ResidenceRecordedEvent) PassiveConditionalWhat ¶ added in v0.0.3
func (e *ResidenceRecordedEvent) PassiveConditionalWhat(adverb string) string
func (*ResidenceRecordedEvent) PassiveWhat ¶ added in v0.0.3
func (e *ResidenceRecordedEvent) PassiveWhat() string
func (*ResidenceRecordedEvent) PastPerfectWhat ¶ added in v0.0.3
func (e *ResidenceRecordedEvent) PastPerfectWhat() string
func (*ResidenceRecordedEvent) PresentPerfectWhat ¶ added in v0.0.3
func (e *ResidenceRecordedEvent) PresentPerfectWhat() 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 SeparationEvent ¶ added in v0.0.3
type SeparationEvent struct {
GeneralEvent
GeneralUnionEvent
}
SeparationEvent represents the formal separation of a couple, often a precursor to divorce
func (*SeparationEvent) ShortDescription ¶ added in v0.0.3
func (e *SeparationEvent) ShortDescription() string
func (*SeparationEvent) SortsBefore ¶ added in v0.0.3
func (e *SeparationEvent) SortsBefore(other TimelineEvent) bool
func (*SeparationEvent) Type ¶ added in v0.0.3
func (e *SeparationEvent) Type() string
func (*SeparationEvent) What ¶ added in v0.0.3
func (e *SeparationEvent) 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
Quality SourceQuality
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 SourceQuality ¶ added in v0.0.3
type SourceQuality string
const ( SourceQualityUnknown SourceQuality = "" SourceQualityPrimary SourceQuality = "primary" SourceQualitySecondary SourceQuality = "secondary" SourceQualityTertiary SourceQuality = "tertiary" )
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
IsParticipant(p *Person) bool // whether or not person has a role in the event
GetParticipant(*Person) []*EventParticipant
GetParticipants() []*EventParticipant
AddParticipant(*EventParticipant)
GetParticipantsByRole(EventRole) []*EventParticipant
GetMediaObjects() []*CitedMediaObject
}
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
func FindFirstEvent ¶ added in v0.0.3
func FindFirstEvent(evs []TimelineEvent, include EventMatcher) (TimelineEvent, bool)
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