|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecteu.etaxonomy.cdm.model.common.CdmBase
eu.etaxonomy.cdm.model.common.VersionableEntity
eu.etaxonomy.cdm.model.common.AnnotatableEntity
eu.etaxonomy.cdm.model.description.DescriptionElementBase
eu.etaxonomy.cdm.model.description.TextData
@Indexed(index="eu.etaxonomy.cdm.model.description.DescriptionElementBase") public class TextData
This class represents information pieces expressed in one or several natural
languages (for the feature "medical use" for instance).
A format used for structuring the text may also be stated.
This class corresponds partially to NaturalLanguageDescriptionType according to the SDD schema.
| Field Summary |
|---|
| 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 | |
|---|---|
TextData()
Class constructor: creates a new empty text data instance. |
|
TextData(Feature feature)
Class constructor: creates a new text data instance with the feature
to be described. |
|
| Method Summary | |
|---|---|
Object |
clone()
Clones this text data. |
boolean |
containsKey(Language language)
|
boolean |
containsValue(LanguageString languageString)
|
int |
countLanguages()
Returns the number of languages in which the content
of this text data has been formulated. |
TextFormat |
getFormat()
Returns the format used for structuring the text representing
the content of this text data. |
LanguageString |
getLanguageText(Language language)
Returns the multilanguage text with the content of this text data for a specific language. |
Map<Language,LanguageString> |
getMultilanguageText()
Returns a copy of the multilanguage text with the content of this text data. |
LanguageString |
getPreferredLanguageString(List<Language> languages)
Returns the LanguageString in the preferred language. |
String |
getText(Language language)
Returns the text string in the given language with the content
of this text data. |
static TextData |
NewInstance()
Creates a new empty text data instance. |
static TextData |
NewInstance(Feature feature)
Creates a new text data instance with the feature
to be described. |
static TextData |
NewInstance(String text,
Language language,
TextFormat format)
Creates a new text data instance with a given text in a given particular language and with the given text format for structuring it. |
LanguageString |
putText(LanguageString languageString)
Adds a translated text in a particular language
to the multi-language text representing the content of this text data. |
LanguageString |
putText(Language language,
String text)
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 |
putText(String text,
Language language)
Deprecated. should follow the put semantic of maps, this method will be removed in v4.0 Use the putText method instead |
LanguageString |
removeText(Language language)
Removes from the multilanguage representing the content of this text data the one language string
with the given language. |
void |
setFormat(TextFormat format)
|
int |
size()
Returns the number of languages available for this text data. |
| Methods inherited from class eu.etaxonomy.cdm.model.description.DescriptionElementBase |
|---|
addMedia, addModifier, addModifyingText, addModifyingText, addSource, addSource, addSource, clone, getFeature, getInDescription, getMedia, getModifiers, getModifiers, getModifyingText, getSources, makeModifierMap, putModifyingText, putModifyingText, removeMedia, removeModifier, removeModifyingText, removeSource, setFeature, setInDescription |
| 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, invokeSetMethod, invokeSetMethodWithNull, isInstanceOf, removePropertyChangeListener, removePropertyChangeListener, setCreated, setCreatedBy, setId, setUuid, toString |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface eu.etaxonomy.cdm.model.common.IVersionableEntity |
|---|
getUpdated, getUpdatedBy, setUpdated, setUpdatedBy |
| Methods inherited from interface eu.etaxonomy.cdm.model.common.ICdmBase |
|---|
getCreated, getCreatedBy, getId, getUuid, setCreated, setCreatedBy, setId, setUuid |
| Constructor Detail |
|---|
public TextData()
TextData(Feature)public TextData(Feature feature)
feature
to be described.
feature - the feature the text data refer toTextData()| Method Detail |
|---|
public static TextData NewInstance()
NewInstance(Feature),
NewInstance(String, Language, TextFormat)public static TextData NewInstance(Feature feature)
feature
to be described.
feature - the feature the text data refer toNewInstance(),
NewInstance(String, Language, TextFormat)
public static TextData NewInstance(String text,
Language language,
TextFormat format)
language and with the given text format for structuring it.
text - the text string with the content of the descriptionlanguage - the language in which the text string is formulatedformat - the text format used to structure the text stringNewInstance(),
NewInstance(Feature)public Map<Language,LanguageString> getMultilanguageText()
language strings (texts) contained in the
multilanguage text should all have the same meaning.
getText(Language)public LanguageString getLanguageText(Language language)
language - the language in which the text string looked for is formulated
public String getText(Language language)
language with the content
of this text data.
language - the language in which the text string looked for is formulated#getMultilanguageText(Language)public LanguageString getPreferredLanguageString(List<Language> languages)
TermBase.getPreferredRepresentation(List)
languages -
@Deprecated
public LanguageString putText(String text,
Language language)
putText method instead
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.
text - the string representing the content of the text data
in a particular languagelanguage - the language in which the text string is formulated
getMultilanguageText(),
putText(LanguageString)
public LanguageString putText(Language language,
String text)
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 language
getMultilanguageText(),
putText(LanguageString)public LanguageString putText(LanguageString languageString)
text in a particular language
to the multi-language text representing the content of this text data.
The given language string will be returned.
languageString - the language string representing the content of
the text data in a particular language
getMultilanguageText(),
putText(String, Language),
HashMap.put(Object, Object)public LanguageString removeText(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
getMultilanguageText()public int countLanguages()
languages in which the content
of this text data has been formulated.
getMultilanguageText()public TextFormat getFormat()
format used for structuring the text representing
the content of this text data.
getMultilanguageText()public void setFormat(TextFormat format)
getFormat()public boolean containsKey(Language language)
language -
java.util.Map#containsKey(Object)}public boolean containsValue(LanguageString languageString)
languageString -
java.util.Map#containsValue(Object)}public int size()
java.util.Map#size()}public Object clone()
clone in class DescriptionElementBaseDescriptionElementBase.clone(),
Object.clone()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||