@Entity public class KeyStatement extends VersionableEntity implements IMultiLanguageTextHolder
CLOB_LENGTH, uuid
Constructor and Description |
---|
KeyStatement() |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone()
Clones this KeyStatement.
|
int |
countLanguages()
Returns the number of
languages in which the label
of this key statement has been formulated. |
java.util.Map<Language,LanguageString> |
getLabel()
Returns the label with the content of this key statement.
|
LanguageString |
getLabel(Language language)
Returns the label with the content of this key statement for
a specific language.
|
java.lang.String |
getLabelText(Language language)
Returns the text string in the given
language with the content
of this key statement. |
LanguageString |
getPreferredLanguageString(java.util.List<Language> languages)
Returns the LanguageString in the preferred language.
|
static KeyStatement |
NewInstance() |
static KeyStatement |
NewInstance(Language language,
java.lang.String label)
Factory method for a key statement.
|
static KeyStatement |
NewInstance(java.lang.String defaultLanguageLabel) |
LanguageString |
putLabel(LanguageString languageString)
Adds a translated
text in a particular language
to the label. |
LanguageString |
putLabel(Language language,
java.lang.String label)
Creates a
language string based on the given text string
and the given language , returns it and adds it to the multilanguage
text representing the content of this text data. |
LanguageString |
removeLabel(Language language)
Removes from label the one
language string
with the given language . |
void |
setLabel(java.util.Map<Language,LanguageString> label) |
java.lang.String |
toString()
Overrides
Object.toString() . |
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, initListener, 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
public static KeyStatement NewInstance()
public static KeyStatement NewInstance(java.lang.String defaultLanguageLabel)
public static KeyStatement NewInstance(Language language, java.lang.String label)
language
- the language of the first representation of the statement. Must not be null
.label
- the text of statement in the given language.public java.util.Map<Language,LanguageString> getLabel()
language strings
(texts) contained in the
label should all have the same meaning.#getText(Language)
public LanguageString getLabel(Language language)
language
- the language in which the label is formulatedpublic void setLabel(java.util.Map<Language,LanguageString> label)
public java.lang.String getLabelText(Language language)
language
with the content
of this key statement.language
- the language in which the label is formulatedgetLabel(Language)
public LanguageString getPreferredLanguageString(java.util.List<Language> languages)
TermBase.getPreferredRepresentation(List)
languages
- public LanguageString putLabel(Language language, java.lang.String label)
language string
based on the given text string
and the given language
, returns it and adds it to the multilanguage
text representing the content of this text data.language
- the language in which the text string is formulatedtext
- the string representing the content of the text data
in a particular languagegetLabel()
,
putLabel(LanguageString)
public LanguageString putLabel(LanguageString languageString)
text in a particular language
to the label.
The given language string will be returned.languageString
- the language string representing the content of
the text data in a particular languagegetLabel()
,
#putLabel(String, Language)
public LanguageString removeLabel(Language language)
language string
with the given language
. Returns the removed
language string.language
- the language in which the language string to be removed
has been formulated#getLabelText()
public int countLanguages()
languages
in which the label
of this key statement has been formulated.#getMultilanguageText()
public java.lang.Object clone()
clone
in class VersionableEntity
eu.etaxonomy.cdm.model.common.VersionableEntitity#clone()
,
Object.clone()
public java.lang.String toString()
CdmBase
Object.toString()
.
This returns an String that identifies the object well without being necessarily unique. Internally the method is delegating the
call to {link CdmBase.instanceToString()
.Note: If overriding this method's javadoc always copy or link the above requirement. If not overwritten by a subclass method returns the class, id and uuid as a string for any CDM object.
For example: Taxon#13<b5938a98-c1de-4dda-b040-d5cc5bfb3bc0>
Copyright © 2007-2020 EDIT. All Rights Reserved.