Package org.gedcomx.conclusion
Class NamePart
- java.lang.Object
-
- org.gedcomx.common.ExtensibleData
-
- org.gedcomx.conclusion.NamePart
-
- All Implemented Interfaces:
HasTransientProperties,HasFields,SupportsExtensionElements
public final class NamePart extends ExtensibleData implements HasFields
A part of a name.- Author:
- Ryan Heaton
-
-
Field Summary
-
Fields inherited from class org.gedcomx.common.ExtensibleData
extensionElements, transientProperties
-
-
Constructor Summary
Constructors Constructor Description NamePart()NamePart(NamePartType type, String text)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(GedcomxModelVisitor visitor)Accept a visitor.voidaddField(Field field)Add a reference to the record field values being used as evidence.voidaddQualifier(Qualifier qualifier)Add a qualifier associated with this name part.NamePartextensionElement(Object element)NamePartfield(Field field)Build out this name part with a field.List<Field>getFields()Get the fields being used as evidence.NamePartTypegetKnownType()The enum referencing the known name part type, orNamePartType.OTHERif not known.List<Qualifier>getQualifiers()The qualifiers associated with this name part.URIgetType()The type of the name part.StringgetValue()The value of the name part.NamePartid(String id)Build up this object with an id.NamePartqualifier(Qualifier qualifier)Build out this name part with a qualifier.Stream<Qualifier>qualifiers()Create a stream for the qualifiers.voidsetFields(List<Field> fields)Set the list of fields being used as evidence.voidsetKnownType(NamePartType knownType)Set the type of this name part from an enumeration of known name part types.voidsetQualifiers(List<Qualifier> qualifiers)Set the qualifiers associated with this name part.voidsetType(URI type)The type of the name part.voidsetValue(String value)The value of the name part.NameParttype(URI type)Build out this name part with a type.NameParttype(NamePartType type)Build out this name part with a type.NamePartvalue(String value)Build out this name part with a value.-
Methods inherited from class org.gedcomx.common.ExtensibleData
addExtensionElement, embed, findExtensionOfType, findExtensionOfType, findExtensionsOfType, findExtensionsOfType, getExtensionElements, getId, getTransientProperties, getTransientProperty, removeExtensionElements, setExtensionElement, setExtensionElements, setId, setTransientProperty, toString
-
-
-
-
Constructor Detail
-
NamePart
public NamePart()
-
NamePart
public NamePart(NamePartType type, String text)
-
-
Method Detail
-
id
public NamePart id(String id)
Description copied from class:ExtensibleDataBuild up this object with an id.- Overrides:
idin classExtensibleData- Parameters:
id- The id.- Returns:
- this.
-
extensionElement
public NamePart extensionElement(Object element)
- Overrides:
extensionElementin classExtensibleData
-
getType
public URI getType()
The type of the name part.- Returns:
- The type of the name part.
-
setType
public void setType(URI type)
The type of the name part.- Parameters:
type- The type of the name part.
-
type
public NamePart type(URI type)
Build out this name part with a type.- Parameters:
type- The type.- Returns:
- this.
-
type
public NamePart type(NamePartType type)
Build out this name part with a type.- Parameters:
type- The type.- Returns:
- this.
-
getKnownType
public NamePartType getKnownType()
The enum referencing the known name part type, orNamePartType.OTHERif not known.- Returns:
- The enum referencing the known name part type, or
NamePartType.OTHERif not known.
-
setKnownType
public void setKnownType(NamePartType knownType)
Set the type of this name part from an enumeration of known name part types.- Parameters:
knownType- The name part type.
-
getValue
public String getValue()
The value of the name part.- Returns:
- The value of the name part.
-
setValue
public void setValue(String value)
The value of the name part.- Parameters:
value- The value of the name part.
-
value
public NamePart value(String value)
Build out this name part with a value.- Parameters:
value- The value.- Returns:
- this.
-
qualifiers
public Stream<Qualifier> qualifiers()
Create a stream for the qualifiers.- Returns:
- a stream for the qualifiers.
-
getQualifiers
public List<Qualifier> getQualifiers()
The qualifiers associated with this name part.- Returns:
- The qualifiers associated with this name part.
-
setQualifiers
public void setQualifiers(List<Qualifier> qualifiers)
Set the qualifiers associated with this name part.- Parameters:
qualifiers- qualifiers to associate with this name part
-
qualifier
public NamePart qualifier(Qualifier qualifier)
Build out this name part with a qualifier.- Parameters:
qualifier- The qualifier.- Returns:
- this.
-
addQualifier
public void addQualifier(Qualifier qualifier)
Add a qualifier associated with this name part.- Parameters:
qualifier- The qualifier to be added.
-
field
public NamePart field(Field field)
Build out this name part 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.
-
accept
public void accept(GedcomxModelVisitor visitor)
Accept a visitor.- Parameters:
visitor- The visitor.
-
-