Class DCPersonName

java.lang.Object
org.dspace.content.DCPersonName

public class DCPersonName extends Object
DSpace person name utility class

Person names in the Dublin Core value table in the DSpace database are stored in the following simple format:

Lastname, First name(s)

FIXME: No policy for dealing with "van"/"van der" and "Jr."

Author:
Robert Tansley
  • Constructor Details

    • DCPersonName

      public DCPersonName()
      Construct a blank name
    • DCPersonName

      public DCPersonName(String rawValue)
      Construct a name from a raw DC value
      Parameters:
      rawValue - the value entry from the database
    • DCPersonName

      public DCPersonName(String lastNameIn, String firstNamesIn)
      Construct a name from a last name and first name
      Parameters:
      lastNameIn - the last name
      firstNamesIn - the first names
  • Method Details

    • toString

      public String toString()
      Return a string for writing the name to the database
      Overrides:
      toString in class Object
      Returns:
      the name, suitable for putting in the database
    • getFirstNames

      public String getFirstNames()
      Get the first name(s). Guaranteed non-null.
      Returns:
      the first name(s), or an empty string if none
    • getLastName

      public String getLastName()
      Get the last name. Guaranteed non-null.
      Returns:
      the last name, or an empty string if none