Package org.gedcomx.conclusion
Class Person
-
- All Implemented Interfaces:
Attributable,HasNotes,HasTransientProperties,HasFacts,SupportsLinks,HasFields,SupportsExtensionElements,ReferencesSources
public class Person extends Subject implements HasFacts, HasFields
A person.- Author:
- Ryan Heaton
-
-
Field Summary
-
Fields inherited from class org.gedcomx.common.ExtensibleData
extensionElements, transientProperties
-
-
Constructor Summary
Constructors Constructor Description Person()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(GedcomxModelVisitor visitor)Accept a visitor.voidaddFact(Fact fact)Add a fact conclusion to the person.voidaddField(Field field)Add a reference to the record field values being used as evidence.voidaddName(Name name)Add a name conclusion to the person.voidaddPersona(EvidenceReference personaRef)Add an persona reference for this subject.Personanalysis(ResourceReference analysis)Add a reference to the analysis for this conclusion.Personanalysis(URI analysis)Add a reference to the analysis for this conclusion.Personanalysis(Document analysis)Add a reference to the analysis for this conclusion.Personattribution(Attribution attribution)Build up this conclusion with attribution.Personconfidence(URI confidence)Build up this conclusion with a confidence level.Personconfidence(ConfidenceLevel confidence)Build up this conclusion with a confidence level.PersondisplayExtension(DisplayProperties display)Build out this person with a display exension.voidembed(Person person)Embed the specified person into this one.Personevidence(EvidenceReference evidence)Build up this subject with an evidence reference.Personevidence(Person evidence)PersonextensionElement(Object element)Personextracted(Boolean extracted)Build up this subject with an extracted flag.Personfact(Fact fact)Build out this person with a fact.Personfield(Field field)Build out this person with a field.Persongender(Gender gender)Build out this person with a gender.Persongender(GenderType gender)Build out this person with a gender.DisplayPropertiesgetDisplayExtension()Display properties for the person.List<Fact>getFacts()The fact conclusions for the person.List<Fact>getFacts(FactType factType)Helper method for obtaining specific fact conclusions.List<Field>getFields()Get the fields being used as evidence.FactgetFirstFactOfType(FactType type)Get the first fact of the specified type.NamegetFirstNameOfType(NameType type)Get the first name of the specified type.GendergetGender()The gender conclusion for the person.BooleangetLiving()Living status of the person as treated by the system.NamegetName()Get the first name of this person.List<Name>getNames()The name conclusions for the person.List<EvidenceReference>getPersonaReferences()References to the persona being referenced for this subject.NamegetPreferredName()Get the preferred name of the person.FactgetPrimaryFact()The primary fact for this person.BooleangetPrincipal()Indicator of whether this person is the "principal" person extracted from the record.BooleangetPrivate()Whether this person has been designated for limited distribution or display.Personid(String id)Build up this object with an id.Personidentifier(Identifier identifier)Build up this subject with an identifier.Personlang(String lang)Build up this conclusion with a lang.Personlink(String rel, URI href)Build up this data with a link.Personlink(Link link)Build up this data with a link.Personliving(Boolean living)Build out this person with a living flag.Personmedia(SourceDescription media)Build up this subject with a media reference.Personmedia(SourceReference media)Build up this subject with a media reference.Personname(String name)Build out this person with a name.Personname(Name name)Build out this person with a name.Stream<Name>names()Create a stream for the names.Personnote(Note note)Build up this conclusion with a note.PersonpersistentId(URI persistentId)Build out this person with a persistent ID.SubjectpersonaReference(EvidenceReference persona)Build up this subject with an persona reference.Stream<EvidenceReference>personaReferences()Create a stream of persona references for this subject.Personprincipal(Boolean principal)Build out this person with a principal flag.voidsetDisplayExtension(DisplayProperties display)Display properties for the person.voidsetFacts(List<Fact> facts)The fact conclusions for the person.voidsetFields(List<Field> fields)Set the list of fields being used as evidence.voidsetGender(Gender gender)The gender conclusion for the person.voidsetLiving(Boolean living)Living status of the person as treated by the system.voidsetNames(List<Name> names)The name conclusions for the person.voidsetPersonaReferences(List<EvidenceReference> refs)References to the persona being referenced for this subject.voidsetPrincipal(Boolean principal)Indicator of whether this person is the "principal" person extracted from the record.voidsetPrivate(Boolean isPrivate)Whether this person has been designated for limited distribution or display.PersonsortKey(String sortKey)Build up this fact with a sort key.Personsource(SourceDescription source)Build up this conclusion with a source reference.Personsource(SourceReference sourceReference)Build up this conclusion with a source reference.StringtoString()Provide a simple toString() method.-
Methods inherited from class org.gedcomx.conclusion.Subject
addEvidence, addIdentifier, addMedia, embed, evidence, getEvidence, getExtracted, getIdentifiers, getMedia, getPersistentId, identifiers, media, setEvidence, setExtracted, setIdentifiers, setMedia, setPersistentId
-
Methods inherited from class org.gedcomx.conclusion.Conclusion
addNote, addSource, embed, getAnalysis, getAttribution, getConfidence, getKnownConfidenceLevel, getLang, getNotes, getSortKey, getSources, notes, setAnalysis, setAttribution, setConfidence, setKnownConfidenceLevel, setLang, setNotes, setSortKey, setSources, sources
-
Methods inherited from class org.gedcomx.links.HypermediaEnabledData
addLink, addLink, addTemplatedLink, embed, getLink, getLinks, getLinks, setLinks
-
Methods inherited from class org.gedcomx.common.ExtensibleData
addExtensionElement, embed, findExtensionOfType, findExtensionOfType, findExtensionsOfType, findExtensionsOfType, getExtensionElements, getId, getTransientProperties, getTransientProperty, removeExtensionElements, setExtensionElement, setExtensionElements, setId, setTransientProperty
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.gedcomx.common.Attributable
getAttribution, setAttribution
-
-
-
-
Method Detail
-
id
public Person id(String id)
Description copied from class:ExtensibleDataBuild up this object with an id.
-
extensionElement
public Person extensionElement(Object element)
- Overrides:
extensionElementin classSubject
-
link
public Person link(String rel, URI href)
Description copied from class:HypermediaEnabledDataBuild up this data with a link.
-
link
public Person link(Link link)
Description copied from class:HypermediaEnabledDataBuild up this data with a link.
-
lang
public Person lang(String lang)
Description copied from class:ConclusionBuild up this conclusion with a lang.
-
confidence
public Person confidence(URI confidence)
Description copied from class:ConclusionBuild up this conclusion with a confidence level.- Overrides:
confidencein classSubject- Parameters:
confidence- The confidence level.- Returns:
- this.
-
confidence
public Person confidence(ConfidenceLevel confidence)
Description copied from class:ConclusionBuild up this conclusion with a confidence level.- Overrides:
confidencein classSubject- Parameters:
confidence- The confidence level.- Returns:
- this.
-
source
public Person source(SourceReference sourceReference)
Description copied from class:ConclusionBuild up this conclusion with a source reference.
-
source
public Person source(SourceDescription source)
Description copied from class:ConclusionBuild up this conclusion with a source reference.
-
note
public Person note(Note note)
Description copied from class:ConclusionBuild up this conclusion with a note.
-
analysis
public Person analysis(ResourceReference analysis)
Description copied from class:ConclusionAdd a reference to the analysis for this conclusion.
-
attribution
public Person attribution(Attribution attribution)
Description copied from class:ConclusionBuild up this conclusion with attribution.- Overrides:
attributionin classSubject- Parameters:
attribution- The attribution.- Returns:
- this.
-
analysis
public Person analysis(Document analysis)
Description copied from class:ConclusionAdd a reference to the analysis for this conclusion.
-
analysis
public Person analysis(URI analysis)
Description copied from class:ConclusionAdd a reference to the analysis for this conclusion.
-
extracted
public Person extracted(Boolean extracted)
Description copied from class:SubjectBuild up this subject with an extracted flag.
-
identifier
public Person identifier(Identifier identifier)
Description copied from class:SubjectBuild up this subject with an identifier.- Overrides:
identifierin classSubject- Parameters:
identifier- The identifier.- Returns:
- this.
-
evidence
public Person evidence(EvidenceReference evidence)
Description copied from class:SubjectBuild up this subject with an evidence reference.
-
personaReferences
public Stream<EvidenceReference> personaReferences()
Create a stream of persona references for this subject.- Returns:
- a stream of persona references for this subject.
-
getPersonaReferences
public List<EvidenceReference> getPersonaReferences()
References to the persona being referenced for this subject.- Returns:
- References to the persona being referenced.
-
setPersonaReferences
public void setPersonaReferences(List<EvidenceReference> refs)
References to the persona being referenced for this subject.- Parameters:
refs- References to the persona being referenced.
-
personaReference
public Subject personaReference(EvidenceReference persona)
Build up this subject with an persona reference.- Parameters:
persona- The persona reference.- Returns:
- this.
-
addPersona
public void addPersona(EvidenceReference personaRef)
Add an persona reference for this subject.- Parameters:
personaRef- The persona to be added.
-
media
public Person media(SourceReference media)
Description copied from class:SubjectBuild up this subject with a media reference.
-
media
public Person media(SourceDescription media)
Description copied from class:SubjectBuild up this subject with a media reference.
-
sortKey
public Person sortKey(String sortKey)
Description copied from class:ConclusionBuild up this fact with a sort key.
-
getPrivate
public Boolean getPrivate()
Whether this person has been designated for limited distribution or display.- Returns:
- Whether this person has been designated for limited distribution or display.
-
setPrivate
public void setPrivate(Boolean isPrivate)
Whether this person has been designated for limited distribution or display.- Parameters:
isPrivate- Whether this person has been designated for limited distribution or display.
-
getLiving
public Boolean getLiving()
Living status of the person as treated by the system. The value of this property is intended to be based on a system-specific calculation and therefore has limited portability. Conclusions about the living status of a person can be modeled with a fact.- Returns:
- Living status of the person as treated by the system.
-
setLiving
public void setLiving(Boolean living)
Living status of the person as treated by the system. The value of this property is intended to be based on a system-specific calculation and therefore has limited portability. Conclusions about the living status of a person can be modeled with a fact.- Parameters:
living- Living status of the person as treated by the system.
-
living
public Person living(Boolean living)
Build out this person with a living flag.- Parameters:
living- The flag.- Returns:
- this.
-
getPrincipal
public Boolean getPrincipal()
Indicator of whether this person is the "principal" person extracted from the record. Applicable only to extracted persons. The meaning of this flag outside the scope of an extracted person is undefined.- Returns:
- Whether this person is the "principal" person extracted from the record.
-
setPrincipal
public void setPrincipal(Boolean principal)
Indicator of whether this person is the "principal" person extracted from the record. Applicable only to extracted persons. The meaning of this flag outside the scope of an extracted person is undefined.- Parameters:
principal- Whether this person is the "principal" person extracted from the record.
-
principal
public Person principal(Boolean principal)
Build out this person with a principal flag.- Parameters:
principal- The principal flag.- Returns:
- this
-
getGender
public Gender getGender()
The gender conclusion for the person.- Returns:
- The gender conclusion for the person.
-
setGender
public void setGender(Gender gender)
The gender conclusion for the person.- Parameters:
gender- The gender conclusion for the person.
-
gender
public Person gender(Gender gender)
Build out this person with a gender.- Parameters:
gender- The gender.- Returns:
- this.
-
gender
public Person gender(GenderType gender)
Build out this person with a gender.- Parameters:
gender- The gender.- Returns:
- this.
-
getNames
public List<Name> getNames()
The name conclusions for the person.- Returns:
- The name conclusions for the person.
-
getName
public Name getName()
Get the first name of this person.- Returns:
- The first name of this person.
-
getFirstNameOfType
public Name getFirstNameOfType(NameType type)
Get the first name of the specified type.- Parameters:
type- The type.- Returns:
- the first name in the name list of the specified type, or null if none.
-
getPreferredName
public Name getPreferredName()
Get the preferred name of the person. If no preferred name is specified, then the first name is returned.- Returns:
- the preferred name of the person or first name if there is no preferred name.
-
setNames
public void setNames(List<Name> names)
The name conclusions for the person.- Parameters:
names- The name conclusions for the person.
-
name
public Person name(Name name)
Build out this person with a name.- Parameters:
name- The name.- Returns:
- this.
-
name
public Person name(String name)
Build out this person with a name.- Parameters:
name- The name.- Returns:
- this.
-
addName
public void addName(Name name)
Add a name conclusion to the person.- Parameters:
name- The name conclusion to be added.
-
getPrimaryFact
public Fact getPrimaryFact()
The primary fact for this person.- Returns:
- The primary fact for this person.
-
getFirstFactOfType
public Fact getFirstFactOfType(FactType type)
Get the first fact of the specified type.- Parameters:
type- The type.- Returns:
- the first fact in the fact list of the specified type, or null if none.
-
getFacts
public List<Fact> getFacts(FactType factType)
Helper method for obtaining specific fact conclusions.- Parameters:
factType- The type of facts to return.- Returns:
- The fact conclusions that match the factType. An empty list will be returned if no facts are found.
-
fact
public Person fact(Fact fact)
Build out this person with a fact.- Parameters:
fact- The fact.- Returns:
- this.
-
addFact
public void addFact(Fact fact)
Add a fact conclusion to the person.- Parameters:
fact- The fact conclusion to be added.
-
getDisplayExtension
public DisplayProperties getDisplayExtension()
Display properties for the person. Display properties are not specified by GEDCOM X core, but as extension elements by GEDCOM X RS.- Returns:
- Display properties for the person. Display properties are not specified by GEDCOM X core, but as extension elements by GEDCOM X RS.
-
setDisplayExtension
public void setDisplayExtension(DisplayProperties display)
Display properties for the person. Display properties are not specified by GEDCOM X core, but as extension elements by GEDCOM X RS.- Parameters:
display- Display properties for the person. Display properties are not specified by GEDCOM X core, but as extension elements by GEDCOM X RS.
-
displayExtension
public Person displayExtension(DisplayProperties display)
Build out this person with a display exension.- Parameters:
display- the display.- Returns:
- this
-
accept
public void accept(GedcomxModelVisitor visitor)
Accept a visitor.- Parameters:
visitor- The visitor.
-
field
public Person field(Field field)
Build out this person with a field.- Parameters:
field- The field.- Returns:
- this.
-
addField
public void addField(Field field)
Add a reference to the record field values being used as evidence.- Parameters:
field- The field to be added.
-
persistentId
public Person persistentId(URI persistentId)
Build out this person with a persistent ID.- Parameters:
persistentId- A long-term, persistent, globally unique identifier for this subject.- Returns:
- this.
-
embed
public void embed(Person person)
Embed the specified person into this one.- Parameters:
person- The person to embed.
-
toString
public String toString()
Provide a simple toString() method.- Overrides:
toStringin classConclusion
-
-