Package org.gedcomx.conclusion
Class Name
- java.lang.Object
-
- org.gedcomx.common.ExtensibleData
-
- org.gedcomx.links.HypermediaEnabledData
-
- org.gedcomx.conclusion.Conclusion
-
- org.gedcomx.conclusion.Name
-
- All Implemented Interfaces:
Attributable,HasNotes,HasTransientProperties,SupportsLinks,SupportsExtensionElements,ReferencesSources
public class Name extends Conclusion
A name conclusion.- Author:
- Ryan Heaton
-
-
Field Summary
-
Fields inherited from class org.gedcomx.common.ExtensibleData
extensionElements, transientProperties
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(GedcomxModelVisitor visitor)Accept a visitor.voidaddNameForm(NameForm nameForm)Add a name form to the list of name forms.Nameanalysis(ResourceReference analysis)Add a reference to the analysis for this conclusion.Nameanalysis(URI analysis)Add a reference to the analysis for this conclusion.Nameanalysis(Document analysis)Add a reference to the analysis for this conclusion.Nameattribution(Attribution attribution)Build up this conclusion with attribution.Nameconfidence(URI confidence)Build up this conclusion with a confidence level.Nameconfidence(ConfidenceLevel confidence)Build up this conclusion with a confidence level.Namedate(Date date)Build up this name with a date.NameextensionElement(Object element)DategetDate()The date the name was first applied or adopted.NameTypegetKnownType()The enum referencing the known name type, orNameType.OTHERif not known.NameFormgetNameForm()The first name form of this name.List<NameForm>getNameForms()Alternate forms of the name, such as the romanized form of a non-latin name.StringgetPart(NamePartType namePartType)Gets a specific part of the nameBooleangetPreferred()Whether the conclusion is preferred above other conclusions of the same type.URIgetType()The type of the name.Nameid(String id)Build up this object with an id.Namelang(String lang)Build up this conclusion with a lang.Namelink(String rel, URI href)Build up this data with a link.Namelink(Link link)Build up this data with a link.NamenameForm(NameForm nameForm)Build up this name with a name form.Stream<NameForm>nameForms()Create a stream for the name forms of this name.Namenote(Note note)Build up this conclusion with a note.Namepreferred(Boolean preferred)Build up this name with a preferred flag.voidsetDate(Date date)The date the name was first applied or adopted.voidsetKnownType(NameType knownType)Set the name type from an enumeration of known name types.voidsetNameForms(List<NameForm> nameForms)Alternate forms of the name, such as the romanized form of a non-latin name.voidsetPreferred(Boolean preferred)Whether the conclusion is preferred above other conclusions of the same type.voidsetType(URI type)The type of the name.NamesortKey(String sortKey)Build up this fact with a sort key.Namesource(SourceDescription source)Build up this conclusion with a source reference.Namesource(SourceReference sourceReference)Build up this conclusion with a source reference.StringtoString()Provide a simple toString() method.Nametype(URI type)Build up this name with a type.Nametype(NameType type)Build up this name with a type.-
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
-
-
-
-
Method Detail
-
id
public Name id(String id)
Description copied from class:ExtensibleDataBuild up this object with an id.- Overrides:
idin classConclusion- Parameters:
id- The id.- Returns:
- this.
-
extensionElement
public Name extensionElement(Object element)
- Overrides:
extensionElementin classConclusion
-
link
public Name link(String rel, URI href)
Description copied from class:HypermediaEnabledDataBuild up this data with a link.- Overrides:
linkin classConclusion- Parameters:
rel- The rel.href- The href.- Returns:
- this.
-
link
public Name link(Link link)
Description copied from class:HypermediaEnabledDataBuild up this data with a link.- Overrides:
linkin classConclusion- Parameters:
link- The link.- Returns:
- this.
-
lang
public Name lang(String lang)
Description copied from class:ConclusionBuild up this conclusion with a lang.- Overrides:
langin classConclusion- Parameters:
lang- The lang.- Returns:
- this.
-
confidence
public Name confidence(URI confidence)
Description copied from class:ConclusionBuild up this conclusion with a confidence level.- Overrides:
confidencein classConclusion- Parameters:
confidence- The confidence level.- Returns:
- this.
-
confidence
public Name confidence(ConfidenceLevel confidence)
Description copied from class:ConclusionBuild up this conclusion with a confidence level.- Overrides:
confidencein classConclusion- Parameters:
confidence- The confidence level.- Returns:
- this.
-
source
public Name source(SourceReference sourceReference)
Description copied from class:ConclusionBuild up this conclusion with a source reference.- Overrides:
sourcein classConclusion- Parameters:
sourceReference- The source reference.- Returns:
- this.
-
source
public Name source(SourceDescription source)
Description copied from class:ConclusionBuild up this conclusion with a source reference.- Overrides:
sourcein classConclusion- Parameters:
source- The source description being referenced.- Returns:
- this.
-
note
public Name note(Note note)
Description copied from class:ConclusionBuild up this conclusion with a note.- Overrides:
notein classConclusion- Parameters:
note- The note.- Returns:
- this.
-
attribution
public Name attribution(Attribution attribution)
Description copied from class:ConclusionBuild up this conclusion with attribution.- Overrides:
attributionin classConclusion- Parameters:
attribution- The attribution.- Returns:
- this.
-
analysis
public Name analysis(ResourceReference analysis)
Description copied from class:ConclusionAdd a reference to the analysis for this conclusion.- Overrides:
analysisin classConclusion- Parameters:
analysis- The analysis.- Returns:
- this.
-
analysis
public Name analysis(Document analysis)
Description copied from class:ConclusionAdd a reference to the analysis for this conclusion.- Overrides:
analysisin classConclusion- Parameters:
analysis- The analysis.- Returns:
- this.
-
analysis
public Name analysis(URI analysis)
Description copied from class:ConclusionAdd a reference to the analysis for this conclusion.- Overrides:
analysisin classConclusion- Parameters:
analysis- The analysis.- Returns:
- this.
-
sortKey
public Name sortKey(String sortKey)
Description copied from class:ConclusionBuild up this fact with a sort key.- Overrides:
sortKeyin classConclusion- Parameters:
sortKey- The sort key.- Returns:
- this.
-
getType
public URI getType()
The type of the name.- Returns:
- The type of the name.
-
setType
public void setType(URI type)
The type of the name.- Parameters:
type- The type of the name.
-
type
public Name type(URI type)
Build up this name with a type.- Parameters:
type- The type.- Returns:
- this.
-
type
public Name type(NameType type)
Build up this name with a type.- Parameters:
type- The type.- Returns:
- this.
-
getKnownType
public NameType getKnownType()
The enum referencing the known name type, orNameType.OTHERif not known.- Returns:
- The enum referencing the known name type, or
NameType.OTHERif not known.
-
setKnownType
public void setKnownType(NameType knownType)
Set the name type from an enumeration of known name types.- Parameters:
knownType- The known type.
-
getDate
public Date getDate()
The date the name was first applied or adopted.- Returns:
- The date the name was first applied or adopted.
-
setDate
public void setDate(Date date)
The date the name was first applied or adopted.- Parameters:
date- The date the name was first applied or adopted.
-
date
public Name date(Date date)
Build up this name with a date.- Parameters:
date- The date.- Returns:
- this.
-
nameForms
public Stream<NameForm> nameForms()
Create a stream for the name forms of this name.- Returns:
- a stream for the name forms of this name.
-
getNameForms
public List<NameForm> getNameForms()
Alternate forms of the name, such as the romanized form of a non-latin name.- Returns:
- Alternate forms of the name, such as the romanized form of a non-latin name.
-
getNameForm
public NameForm getNameForm()
The first name form of this name.- Returns:
- The first name form of this name.
-
setNameForms
public void setNameForms(List<NameForm> nameForms)
Alternate forms of the name, such as the romanized form of a non-latin name.- Parameters:
nameForms- Alternate forms of the name, such as the romanized form of a non-latin name.
-
nameForm
public Name nameForm(NameForm nameForm)
Build up this name with a name form.- Parameters:
nameForm- The name form.- Returns:
- this.
-
addNameForm
public void addNameForm(NameForm nameForm)
Add a name form to the list of name forms.- Parameters:
nameForm- The name form to be added.
-
getPreferred
public Boolean getPreferred()
Whether the conclusion is preferred above other conclusions of the same type. Useful, for example, for display purposes.- Returns:
- Whether the conclusion is preferred above other conclusions of the same type. Useful, for example, for display purposes.
-
setPreferred
public void setPreferred(Boolean preferred)
Whether the conclusion is preferred above other conclusions of the same type. Useful, for example, for display purposes.- Parameters:
preferred- Whether the conclusion is preferred above other conclusions of the same type. Useful, for example, for display purposes.
-
preferred
public Name preferred(Boolean preferred)
Build up this name with a preferred flag.- Parameters:
preferred- The preferred flag.- Returns:
- this.
-
getPart
public String getPart(NamePartType namePartType)
Gets a specific part of the name- Parameters:
namePartType- specific part of the name to retrieve- Returns:
- the specific part of the name that matches the given NamePartType
-
toString
public String toString()
Description copied from class:ConclusionProvide a simple toString() method.- Overrides:
toStringin classConclusion
-
accept
public void accept(GedcomxModelVisitor visitor)
Accept a visitor.- Parameters:
visitor- The visitor.
-
-