Class NameBaseType

java.lang.Object
org.projecthusky.common.basetypes.NameBaseType
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
Name

public class NameBaseType extends Object implements Serializable
A name for a person, organization, place or thing. A sequence of name parts, such as given name or family name, prefix, suffix, etc.
See Also:
  • Constructor Details

    • NameBaseType

      public NameBaseType()
      Instantiates a new name base type. Default constructor.
  • Method Details

    • builder

      @Generated("SparkTools") public static NameBaseType.Builder builder()
      Creates builder to build NameBaseType.
      Returns:
      created builder
    • equals

      public boolean equals(Object obj)
      Checks whether the two objects are equal (based on their content).
      Overrides:
      equals in class Object
      Parameters:
      obj - the NameType to compare
      Returns:
      true, if equal; false otherwise.
    • getDelimiter

      public String getDelimiter()
      Gets the name delimiter. A delimiter has no meaning other than being literally printed in this name representation. A delimiter has no implicit leading and trailing white space.
      Returns:
      the delimiter
    • setDelimiter

      public void setDelimiter(String delimiter)
      Sets the name delimiter. A delimiter has no meaning other than being literally printed in this name representation. A delimiter has no implicit leading and trailing white space.
      Parameters:
      delimiter - the new delimiter
    • getFamily

      public String getFamily()
      Gets the family name. This is the name that links to the genealogy. In some cultures (e.g. Eritrea) the family name of a son is the first name of his father.
      Returns:
      the family
    • setFamily

      public void setFamily(String family)
      Sets the family name. This is the name that links to the genealogy. In some cultures (e.g. Eritrea) the family name of a son is the first name of his father.
      Parameters:
      family - the new family
    • getFullName

      public String getFullName()
      Gets the full name.
      Returns:
      the full name
    • getGiven

      public String getGiven()
      Gets the given name (be careful when calling it "first name" since this given names do not always come first).
      Returns:
      the given
    • setGiven

      public void setGiven(String given)
      Sets the given name (be careful when calling it "first name" since this given names do not always come first).
      Parameters:
      given - the new given
    • getName

      public String getName()
      Gets the whole name. By default, it gets assembled by the different name parts, but if there are none, you may also set this directly.
      Returns:
      the name
    • setName

      public void setName(String name)
      Gets the whole name. By default, it gets assembled by the different name parts, but if there are none, you may also set this directly.
      Parameters:
      name - the new name
    • getNullFlavor

      public NullFlavor getNullFlavor()
      Gets the nullFlavor.
      Returns:
      the null flavor
    • getPrefix

      public String getPrefix()
      Gets the name prefix. A prefix has a strong association to the immediately following name part.
      Returns:
      the prefix
    • setPrefix

      public void setPrefix(String prefix)
      Sets the name prefix. A prefix has a strong association to the immediately following name part.
      Parameters:
      prefix - the new prefix
    • getSuffix

      public String getSuffix()
      Gets the name suffix. A suffix has a strong association to the immediately preceding name part.
      Returns:
      the suffix
    • setSuffix

      public void setSuffix(String suffix)
      Sets the name suffix. A suffix has a strong association to the immediately preceding name part.
      Parameters:
      suffix - the new suffix
    • getUsage

      public EntityNameUse getUsage()
      Gets the name usage. Gets the type of usage (legal, artist, pseudonym, ...).
      Returns:
      the usage
    • setUsage

      public void setUsage(EntityNameUse usage)
      Sets the name usage. Gets the type of usage (legal, artist, pseudonym, ...).
      Parameters:
      usage - the new usage
    • hashCode

      public int hashCode()
      Hash code.
      Overrides:
      hashCode in class Object
      Returns:
      the int
    • isNullFlavor

      public boolean isNullFlavor()
      Checks if the current instance is null flavored.
      Returns:
      true, if is null flavor
    • setNullFlavor

      public void setNullFlavor(NullFlavor nullFlavor)
      Sets the nullFlavor.
      Parameters:
      nullFlavor - the new null flavor
    • toString

      public String toString()
      Builds a string of the name.
      Overrides:
      toString in class Object
      Returns:
      the string