@Entity @Configurable public class Team extends TeamOrPersonBase<Team>
persons
. A team exists either for itself
or is built with the list of (distinct) persons who belong to it.
In the first case the inherited attribute titleCache
is to be used.
In the second case at least all abbreviated names
(the inherited attributes nomenclaturalTitle
)
or all full names (the strings returned by Person.generateTitle)
of the persons must exist. A team is a list
of persons.
This class corresponds to:
Modifier and Type | Field and Description |
---|---|
static Logger |
logger |
collectorTitle, isGeneratingTitleCache, nomenclaturalTitle
cacheStrategy, NOT_PROTECTED, PROTECTED, protectedTitleCache, titleCache
annotations, markers
CLOB_LENGTH, uuid
Constructor and Description |
---|
Team()
Class constructor (including the cache strategy defined in
TeamDefaultCacheStrategy ). |
Modifier and Type | Method and Description |
---|---|
void |
addTeamMember(Person person)
Adds a new
person to this team at the end of the members' list. |
void |
addTeamMember(Person person,
int index)
Adds a new
person to this team
at the given index place of the members' list. |
java.lang.Object |
clone()
Clones this Team.
|
java.lang.String |
getNomenclaturalTitle()
Generates or returns the
nomenclatural identification string for this team. |
java.util.List<Person> |
getTeamMembers()
Returns the list of
members belonging to this team. |
java.lang.String |
getTitleCache()
Returns the title cache.
|
boolean |
isHasMoreMembers()
The hasMoreMembers flag is true if this team has more members than
mentioned in the
teamMembers list. |
boolean |
isProtectedNomenclaturalTitleCache()
Protected nomenclatural title cache flag should be set to true, if
the title cache is to be preferred against the atomized data.
|
static Team |
NewInstance()
Creates a new team instance without any concrete
members . |
static Team |
NewInstance(Person... members) |
static Team |
NewTitledInstance(java.lang.String title,
java.lang.String nomTitle)
Creates a new team instance with a bibliographic and nomenclatural title
but without any
members . |
void |
removeTeamMember(Person person)
Removes one person from the list of members of this team.
|
boolean |
replaceTeamMember(Person newObject,
Person oldObject) |
void |
setHasMoreMembers(boolean hasMoreMembers) |
void |
setNomenclaturalTitle(java.lang.String nomenclaturalTitle)
Assigns a
nomenclatural identification string to this team
and protects it from overwriting. |
void |
setNomenclaturalTitle(java.lang.String nomenclaturalTitle,
boolean protectedNomenclaturalTitleCache)
Assigns a
nomenclatural identification string to this team
and a protection flag status to this string. |
void |
setProtectedNomenclaturalTitleCache(boolean protectedNomenclaturalTitleCache) |
void |
setTeamMembers(java.util.List<Person> teamMembers) |
boolean |
updateCaches() |
getFullTitle, replaceEmptyTitleByNomTitle
addAddress, addAddress, addEmailAddress, addFaxNumber, addPhoneNumber, addUrl, getAddresses, getContact, getEmailAddresses, getFaxNumbers, getPhoneNumbers, getUrls, removeAddress, removeEmailAddress, removeFaxNumber, removePhoneNumber, removeUrl, setContact
addMedia, getMedia, removeMedia
addCredit, addCredit, addExtension, addExtension, addIdentifier, addIdentifier, addIdentifier, addRights, addSource, addSources, createNewSource, generateTitle, getCacheStrategy, getCredits, getCredits, getData, getExtensions, getExtensions, getExtensions, getExtensionsConcat, getExtensionsConcat, getFilteredExtensions, getIdentifiers, getIdentifiers, getIdentifiers, getLsid, getRights, getTruncatedCache, hasEmptyTitleCache, hasExtension, hasExtension, initListener, isProtectedTitleCache, removeCredit, removeCredit, removeExtension, removeIdentifier, removeIdentifier, removeRights, replaceCredit, replaceIdentifier, resetTitleCache, setCacheStrategy, setLsid, setProtectedTitleCache, setTitleCache, setTitleCache, toString, updateCaches
addAggregationSource, addImportSource, addPrimaryTaxonomicSource, addPrimaryTaxonomicSource, addSource, addSource, getSources, removeSource, removeSources
addAnnotation, addMarker, addMarker, getAnnotations, getAnnotations, getMarkers, getMarkers, hasMarker, hasMarker, markerValue, removeAnnotation, removeMarker, removeMarker, setAnnotations
cloneLanguageString, equals, getUpdated, getUpdatedBy, setUpdated, setUpdatedBy
addPropertyChangeListener, addPropertyChangeListener, addToSetWithChangeEvent, deproxy, deproxy, fireOnCreateEvent, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getCreated, getCreatedBy, getId, getUserFriendlyDescription, getUserFriendlyFieldName, getUserFriendlyTypeName, getUuid, hashCode, hasListeners, instanceToString, invokeSetMethod, invokeSetMethodWithNull, isBlank, isInstanceOf, isNotBlank, isPersited, removeFromSetWithChangeEvent, removePropertyChangeListener, removePropertyChangeListener, replaceInList, setCreated, setCreatedBy, setId, setNewEntityListener, setUuid
finalize, getClass, notify, notifyAll, wait, wait, wait
getCreated, getCreatedBy, getId, getUuid, isInstanceOf, isPersited, setCreated, setCreatedBy, setId, setUuid
removeSources
addAggregationSource, addImportSource, addPrimaryTaxonomicSource, addPrimaryTaxonomicSource, addSource, addSource, getSources, removeSource
addAnnotation, addMarker, getAnnotations, getMarkers, getMarkers, hasMarker, hasMarker, markerValue, removeAnnotation, removeMarker, removeMarker
getUpdated, getUpdatedBy, setUpdated, setUpdatedBy
public static final Logger logger
public Team()
TeamDefaultCacheStrategy
).public static Team NewInstance()
members
.public static Team NewTitledInstance(java.lang.String title, java.lang.String nomTitle)
members
. The caches are set to protected.public java.util.List<Person> getTeamMembers()
members
belonging to this team.
A person may be a member of several distinct teams.public void setTeamMembers(java.util.List<Person> teamMembers) throws EntityCollectionSetterAdapter.SetterAdapterException
public void addTeamMember(Person person)
person
to this team at the end of the members' list.person
- the person who should be added to the other team membersgetTeamMembers()
,
Person
public void addTeamMember(Person person, int index)
person
to this team
at the given index place of the members' list. If the person is already
a member of the list he will be moved to the given index place.
The index must be an integer (>=0). If the index is larger than
the present number of members the person will be added at the end of the list.person
- the person who should be added to the other team membersindex
- the position at which the person should be placed within the members' list (starting with 0)getTeamMembers()
,
Person
public void removeTeamMember(Person person)
person
- the person who should be deleted from this teamgetTeamMembers()
public java.lang.String getNomenclaturalTitle()
nomenclatural identification
string for this team.
This method overrides getNomenclaturalTitle
.
This string is built with the abbreviated names
of all persons belonging to its (ordered) members' list if the flag
protectedNomenclaturalTitleCache
is not set.
Otherwise this method returns the present nomenclatural abbreviation.
In case the string is generated the cache strategy used is defined in
TeamDefaultCacheStrategy
.
The result might be kept as nomenclatural abbreviation
by using the setNomenclaturalTitle
method.getNomenclaturalTitle
in interface INomenclaturalAuthor
getNomenclaturalTitle
in class TeamOrPersonBase<Team>
INomenclaturalAuthor.getNomenclaturalTitle()
public void setNomenclaturalTitle(java.lang.String nomenclaturalTitle)
nomenclatural identification
string to this team
and protects it from overwriting.
This method overrides setNomenclaturalTitle
.setNomenclaturalTitle
in interface INomenclaturalAuthor
setNomenclaturalTitle
in class TeamOrPersonBase<Team>
getNomenclaturalTitle()
,
setNomenclaturalTitle(String, boolean)
public void setNomenclaturalTitle(java.lang.String nomenclaturalTitle, boolean protectedNomenclaturalTitleCache)
nomenclatural identification
string to this team
and a protection flag status to this string.getNomenclaturalTitle()
public java.lang.String getTitleCache()
IIdentifiableEntity
getTitleCache
in interface IIdentifiableEntity
getTitleCache
in class TeamOrPersonBase<Team>
IIdentifiableEntity.generateTitle()
public boolean isProtectedNomenclaturalTitleCache()
public void setProtectedNomenclaturalTitleCache(boolean protectedNomenclaturalTitleCache)
public boolean isHasMoreMembers()
teamMembers
list. This is usually the case
when "et al." is used in the team representation. Formatters should add
"et al." or an according post fix to the team string representation
if this flag is set.public void setHasMoreMembers(boolean hasMoreMembers)
public boolean updateCaches()
updateCaches
in class IdentifiableEntity<INomenclaturalAuthorCacheStrategy<Team>>
public java.lang.Object clone()
clone
in class IdentifiableMediaEntity<INomenclaturalAuthorCacheStrategy<Team>>
IdentifiableMediaEntity.clone()
,
Object.clone()
Copyright © 2007-2020 EDIT. All Rights Reserved.