org.dspace.content
Class DCPersonName

java.lang.Object
  extended by 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."

Version:
$Revision: 4290 $
Author:
Robert Tansley

Constructor Summary
DCPersonName()
          Construct a blank name
DCPersonName(String rawValue)
          Construct a name from a raw DC value
DCPersonName(String lastNameIn, String firstNamesIn)
          Construct a name from a last name and first name
 
Method Summary
 String getFirstNames()
          Get the first name(s).
 String getLastName()
          Get the last name.
 String toString()
          Return a string for writing the name to the database
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

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 Detail

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


Copyright © 2010 DuraSpace. All Rights Reserved.