eu.etaxonomy.cdm.model.agent
Class Person

java.lang.Object
  extended by eu.etaxonomy.cdm.model.common.CdmBase
      extended by eu.etaxonomy.cdm.model.common.VersionableEntity
          extended by eu.etaxonomy.cdm.model.common.AnnotatableEntity
              extended by eu.etaxonomy.cdm.model.common.IdentifiableEntity<S>
                  extended by eu.etaxonomy.cdm.model.media.IdentifiableMediaEntity<S>
                      extended by eu.etaxonomy.cdm.model.agent.AgentBase<INomenclaturalAuthorCacheStrategy<T>>
                          extended by eu.etaxonomy.cdm.model.agent.TeamOrPersonBase<Person>
                              extended by eu.etaxonomy.cdm.model.agent.Person
All Implemented Interfaces:
INomenclaturalAuthor, IAnnotatableEntity, ICdmBase, IIdentifiableEntity, ISourceable<IdentifiableSource>, IVersionableEntity, IMediaDocumented, IMediaEntity, IMatchable, IMergable, Serializable, Cloneable

@Entity
@Indexed(index="eu.etaxonomy.cdm.model.agent.AgentBase")
@Configurable
public class Person
extends TeamOrPersonBase<Person>

This class represents human beings, living or dead.
It includes name parts, contact details, institutional membership, and other possible information such as life time period, taxonomic and/or geographical specialization. For a short abbreviated name the inherited attribute nomenclaturalTitle is to be used.
For other alternative (string-)names OriginalSource instances must be created and the inherited attribute originalNameString must be used.

This class corresponds to:

Version:
1.0
Author:
m.doering
See Also:
Serialized Form

Field Summary
protected  Set<InstitutionalMembership> institutionalMemberships
           
static Logger logger
           
 
Fields inherited from class eu.etaxonomy.cdm.model.agent.TeamOrPersonBase
isGeneratingTitleCache, nomenclaturalTitle
 
Fields inherited from class eu.etaxonomy.cdm.model.common.IdentifiableEntity
cacheStrategy, NOT_PROTECTED, PROTECTED, protectedTitleCache, titleCache
 
Fields inherited from class eu.etaxonomy.cdm.model.common.AnnotatableEntity
annotations, markers
 
Fields inherited from class eu.etaxonomy.cdm.model.common.CdmBase
uuid
 
Constructor Summary
protected Person()
          Class constructor.
  Person(String firstname, String lastname, String nomenclaturalTitel)
          Class constructor using a "forenames" string (including initials), a surname (family name) and an abbreviated name as used in nomenclature.
 
Method Summary
protected  void addInstitutionalMembership(InstitutionalMembership ims)
           
 InstitutionalMembership addInstitutionalMembership(Institution institution, TimePeriod period, String department, String role)
          Adds a new membership of this person in an institution to the set of his institution memberships.
 Object clone()
          Clones this Person.
 String getFirstname()
          Returns the string representing the given name or forename (for instance "John") of this person.
 Set<InstitutionalMembership> getInstitutionalMemberships()
          Returns the set of institution memberships corresponding to this person.
 String getLastname()
          Returns the string representing the hereditary name (surname or family name) (for instance "Smith") of this person.
 TimePeriod getLifespan()
          Returns the period of time in which this person was alive (life span).
 String getPrefix()
          Returns the string representing the prefix (for instance "Prof. Dr.") to this person's name.
 String getSuffix()
          Returns the string representing the suffix (for instance "Junior") of this person's name.
static Person NewInstance()
          Creates a new empty instance for a person whose existence is all what is known.
static Person NewTitledInstance(String titleCache)
          Creates a new instance for a person for whom an "identification" string is all what is known.
 void removeInstitutionalMembership(InstitutionalMembership ims)
          Removes one element from the set of institutional memberships of this person.
 void setFirstname(String firstname)
           
 void setLastname(String lastname)
           
 void setLifespan(TimePeriod lifespan)
           
 void setPrefix(String prefix)
           
 void setSuffix(String suffix)
           
 
Methods inherited from class eu.etaxonomy.cdm.model.agent.TeamOrPersonBase
getNomenclaturalTitle, getTitleCache, replaceEmptyTitleByNomTitle, setNomenclaturalTitle
 
Methods inherited from class eu.etaxonomy.cdm.model.agent.AgentBase
addAddress, addAddress, addEmailAddress, addFaxNumber, addPhoneNumber, addUrl, getAddresses, getContact, getEmailAddresses, getFaxNumbers, getPhoneNumbers, getUrls, removeAddress, removeEmailAddress, removeFaxNumber, removePhoneNumber, removeUrl, setContact
 
Methods inherited from class eu.etaxonomy.cdm.model.media.IdentifiableMediaEntity
addMedia, getMedia, removeMedia
 
Methods inherited from class eu.etaxonomy.cdm.model.common.IdentifiableEntity
addCredit, addCredit, addExtension, addExtension, addRights, addSource, addSource, compareTo, generateTitle, getCacheStrategy, getCredits, getCredits, getData, getExtensions, getExtensions, getExtensions, getLsid, getRights, getSources, getTruncatedCache, initListener, isProtectedTitleCache, regenerateTitleCache, removeCredit, removeCredit, removeExtension, removeRights, removeSource, setCacheStrategy, setLsid, setProtectedTitleCache, setTitleCache, setTitleCache, toString
 
Methods inherited from class eu.etaxonomy.cdm.model.common.AnnotatableEntity
addAnnotation, addMarker, getAnnotations, getMarkers, hasMarker, hasMarker, removeAnnotation, removeMarker
 
Methods inherited from class eu.etaxonomy.cdm.model.common.VersionableEntity
equals, getUpdated, getUpdatedBy, setUpdated, setUpdatedBy
 
Methods inherited from class eu.etaxonomy.cdm.model.common.CdmBase
addPropertyChangeListener, addPropertyChangeListener, clone, deproxy, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getCreated, getCreatedBy, getId, getUuid, hashCode, hasListeners, instanceToString, invokeSetMethod, invokeSetMethodWithNull, isInstanceOf, removePropertyChangeListener, removePropertyChangeListener, setCreated, setCreatedBy, setId, setUuid
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface eu.etaxonomy.cdm.model.common.ICdmBase
getCreated, getCreatedBy, getId, getUuid, setCreated, setCreatedBy, setId, setUuid
 
Methods inherited from interface eu.etaxonomy.cdm.model.common.IAnnotatableEntity
addAnnotation, addMarker, getAnnotations, getMarkers, hasMarker, hasMarker, removeAnnotation, removeMarker
 
Methods inherited from interface eu.etaxonomy.cdm.model.common.IVersionableEntity
getUpdated, getUpdatedBy, setUpdated, setUpdatedBy
 

Field Detail

logger

public static final Logger logger

institutionalMemberships

protected Set<InstitutionalMembership> institutionalMemberships
Constructor Detail

Person

protected Person()
Class constructor.

See Also:
Person(String, String, String)

Person

public Person(String firstname,
              String lastname,
              String nomenclaturalTitel)
Class constructor using a "forenames" string (including initials), a surname (family name) and an abbreviated name as used in nomenclature. For the abbreviated name the inherited attribute nomenclaturalTitle is used.

Parameters:
firstname - the given name
lastname - the hereditary name
nomenclaturalTitel - the abbreviated name
See Also:
Person(), NewInstance()
Method Detail

NewInstance

public static Person NewInstance()
Creates a new empty instance for a person whose existence is all what is known. This can be a provisional solution until more information about this person can be gathered, for instance in case a member of a nomenclatural author team is not explicitly mentioned. It also includes the cache strategy defined in PersonDefaultCacheStrategy.


NewTitledInstance

public static Person NewTitledInstance(String titleCache)
Creates a new instance for a person for whom an "identification" string is all what is known. This string is generally a short or a complete name. As this string is kept in the titleCache attribute and should not be overwritten by the generateTitle method the protectedTitleCache flag will be turned on.


getInstitutionalMemberships

public Set<InstitutionalMembership> getInstitutionalMemberships()
Returns the set of institution memberships corresponding to this person.

See Also:
InstitutionalMembership

addInstitutionalMembership

protected void addInstitutionalMembership(InstitutionalMembership ims)

addInstitutionalMembership

public InstitutionalMembership addInstitutionalMembership(Institution institution,
                                                          TimePeriod period,
                                                          String department,
                                                          String role)
Adds a new membership of this person in an institution to the set of his institution memberships. This method also creates a new institutional membership instance.

Parameters:
institution - the institution this person belongs to
period - the time period for which this person has been a member of the institution
department - the string label for the department this person belongs to, within the institution
role - the string label for the persons's role within the department or institution
See Also:
getInstitutionalMemberships(), InstitutionalMembership.InstitutionalMembership(Institution, Person, TimePeriod, String, String)

removeInstitutionalMembership

public void removeInstitutionalMembership(InstitutionalMembership ims)
Removes one element from the set of institutional memberships of this person. Institute and person attributes of the institutional membership object will be nullified.

Parameters:
ims - the institutional membership of this person which should be deleted
See Also:
getInstitutionalMemberships()

getPrefix

public String getPrefix()
Returns the string representing the prefix (for instance "Prof. Dr.") to this person's name.


setPrefix

public void setPrefix(String prefix)
See Also:
getPrefix()

getFirstname

public String getFirstname()
Returns the string representing the given name or forename (for instance "John") of this person. This is the part of his name which is not shared with other family members. Actually it may be just initials (for instance "G. Jr."), all forenames in full or a combination of expanded names and initials.


setFirstname

public void setFirstname(String firstname)
See Also:
getFirstname()

getLastname

public String getLastname()
Returns the string representing the hereditary name (surname or family name) (for instance "Smith") of this person. This is the part of his name which is common to (all) other members of his family, as distinct from the given name or forename.


setLastname

public void setLastname(String lastname)
See Also:
getLastname()

getSuffix

public String getSuffix()
Returns the string representing the suffix (for instance "Junior") of this person's name.


setSuffix

public void setSuffix(String suffix)
See Also:
getSuffix()

getLifespan

public TimePeriod getLifespan()
Returns the period of time in which this person was alive (life span). The general form is birth date - death date (XXXX - YYYY; XXXX - or - YYYY as appropriate), but a simple flourished date (fl. XXXX) is also possible if that is all what is known.

See Also:
TimePeriod

setLifespan

public void setLifespan(TimePeriod lifespan)
See Also:
getLifespan()

clone

public Object clone()
Clones this Person. This is a shortcut that enables to create a new instance that differs only slightly from this Person.

Overrides:
clone in class IdentifiableMediaEntity<INomenclaturalAuthorCacheStrategy<Person>>
See Also:
IdentifiableMediaEntity.clone(), Object.clone()


Copyright © 2007-2013 EDIT. All Rights Reserved.