org.gedcomx.conclusion
Class NamePart

java.lang.Object
  extended by org.gedcomx.common.ExtensibleData
      extended by 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
NamePart()
           
NamePart(NamePartType type, String text)
           
 
Method Summary
 void accept(GedcomxModelVisitor visitor)
          Accept a visitor.
 void addField(Field field)
          Add a reference to the record field values being used as evidence.
 void addQualifier(Qualifier qualifier)
          Add a qualifier associated with this name part.
 NamePart field(Field field)
          Build out this name part with a field.
 List<Field> getFields()
          Get the fields being used as evidence.
 NamePartType getKnownType()
          The enum referencing the known name part type, or NamePartType.OTHER if not known.
 List<Qualifier> getQualifiers()
          The qualifiers associated with this name part.
 URI getType()
          The type of the name part.
 String getValue()
          The value of the name part.
 NamePart id(String id)
          Build up this object with an id.
 NamePart qualifier(Qualifier qualifier)
          Build out this name part with a qualifier.
 void setFields(List<Field> fields)
          Set the list of fields being used as evidence.
 void setKnownType(NamePartType knownType)
          Set the type of this name part from an enumeration of known name part types.
 void setQualifiers(List<Qualifier> qualifiers)
          Set the qualifiers associated with this name part.
 void setType(URI type)
          The type of the name part.
 void setValue(String value)
          The value of the name part.
 NamePart type(NamePartType type)
          Build out this name part with a type.
 NamePart type(URI type)
          Build out this name part with a type.
 NamePart value(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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NamePart

public NamePart()

NamePart

public NamePart(NamePartType type,
                String text)
Method Detail

id

public NamePart id(String id)
Description copied from class: ExtensibleData
Build up this object with an id.

Overrides:
id in class ExtensibleData
Parameters:
id - The id.

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, or NamePartType.OTHER if not known.

Returns:
The enum referencing the known name part type, or NamePartType.OTHER if 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.

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.

getFields

public List<Field> getFields()
Get the fields being used as evidence.

Specified by:
getFields in interface HasFields
Returns:
The references to the record fields being used as evidence.

setFields

public void setFields(List<Field> fields)
Set the list of fields being used as evidence.

Specified by:
setFields in interface HasFields
Parameters:
fields - - List of fields

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.


Copyright © 2015. All rights reserved.