@Entity public class StateData extends VersionableEntity implements IModifiable, IMultiLanguageTextHolder
state terms
) to features
corresponding to categorical data
. A state data instance
constitutes an atomized part of an information piece (categorical data) so
that several state data instances may belong to one categorical data
instance.
This class corresponds to CharacterStateDataType according to the SDD schema.
CLOB_LENGTH, uuid
Constructor and Description |
---|
StateData()
Class constructor: creates a new empty state data instance.
|
Modifier and Type | Method and Description |
---|---|
void |
addModifier(DefinedTerm modifier)
Adds a
modifier to the set of modifiers
used to qualify the validity of this state data. |
LanguageString |
addModifyingText(java.lang.String text,
Language language)
Deprecated.
should follow the put semantic of maps, this method will be removed in v4.0
Use the
putModifyingText method instead |
java.lang.Object |
clone()
Clones this state data.
|
CategoricalData |
getCategoricalData()
Returns the
state term this state data
belongs to. |
java.lang.Integer |
getCount()
Returns the number of single data using this state if this
StateData was created by aggregation.
|
java.util.Set<DefinedTerm> |
getModifiers()
Returns the set of
modifiers used to qualify the validity
of this state data. |
java.util.Map<Language,LanguageString> |
getModifyingText()
Returns the
multilanguage text used to qualify the validity
of this state data. |
State |
getState()
Returns the
state term used in this state data. |
void |
incrementCount()
Increments the count by 1.
|
static StateData |
NewInstance()
Creates a new empty state data instance.
|
static StateData |
NewInstance(State state)
Creates a new empty state data instance.
|
LanguageString |
putModifyingText(LanguageString text)
Adds a translated
text in a particular language
to the multilanguage text used to qualify the validity
of this state data. |
LanguageString |
putModifyingText(Language language,
java.lang.String text)
Creates a
language string based on the given text string
and the given language and adds it to the multilanguage text
used to qualify the validity of this state data. |
void |
removeModifier(DefinedTerm modifier)
Removes one element from the set of
modifiers
used to qualify the validity of this state data. |
LanguageString |
removeModifyingText(Language lang)
Removes from the
multilanguage text used to qualify the validity
of this state data the one language string
with the given language . |
protected void |
setCategoricalData(CategoricalData categoricalData)
Deprecated.
|
void |
setCount(java.lang.Integer count) |
void |
setState(State state) |
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
getUpdated, getUpdatedBy, setUpdated, setUpdatedBy
getCreated, getCreatedBy, getId, getUuid, isInstanceOf, isPersited, setCreated, setCreatedBy, setId, setUuid
public StateData()
public static StateData NewInstance()
public static StateData NewInstance(State state)
State
is a sub class of DefinedTermBase
.
If the state passed as parameter has been created newly it has to be persisted before it is possible to save the StateData.public State getState()
state term
used in this state data.public void setState(State state)
getState()
public java.lang.Integer getCount()
public void setCount(java.lang.Integer count)
getCount()
public void incrementCount()
getCount()
public CategoricalData getCategoricalData()
state term
this state data
belongs to.@Deprecated protected void setCategoricalData(CategoricalData categoricalData)
public java.util.Set<DefinedTerm> getModifiers()
modifiers
used to qualify the validity
of this state data. This is only metainformation.getModifiers
in interface IModifiable
public void addModifier(DefinedTerm modifier)
modifier
to the set of modifiers
used to qualify the validity of this state data.addModifier
in interface IModifiable
modifier
- the modifier to be added to this state datagetModifiers()
public void removeModifier(DefinedTerm modifier)
modifiers
used to qualify the validity of this state data.removeModifier
in interface IModifiable
modifier
- the modifier which should be removedgetModifiers()
,
#addModifier(Modifier)
public java.util.Map<Language,LanguageString> getModifyingText()
multilanguage text
used to qualify the validity
of this state data. The different language strings
contained in the multilanguage text should all have the same meaning.term vocabulary
as a modifier
does.
NOTE: the actual content of this state data is NOT stored in the modifying text. This is only metainformation (like "Some experts express doubt about this assertion").
@Deprecated public LanguageString addModifyingText(java.lang.String text, Language language)
putModifyingText
method insteadlanguage string
based on the given text string
and the given language
and adds it to the multilanguage text
used to qualify the validity of this state data.text
- the string describing the validity
in a particular languagelanguage
- the language in which the text string is formulatedgetModifyingText()
,
putModifyingText(LanguageString)
public LanguageString putModifyingText(Language language, java.lang.String text)
language string
based on the given text string
and the given language
and adds it to the multilanguage text
used to qualify the validity of this state data.language
- the language in which the text string is formulatedtext
- the string describing the validity
in a particular languagegetModifyingText()
,
#addModifyingText(LanguageString)
public LanguageString putModifyingText(LanguageString text)
text in a particular language
to the multilanguage text
used to qualify the validity
of this state data.text
- the language string describing the validity
in a particular languagegetModifyingText()
,
putModifyingText(Language, String)
public LanguageString removeModifyingText(Language lang)
multilanguage text
used to qualify the validity
of this state data the one language string
with the given language
.lang
- the language in which the language string to be removed
has been formulatedgetModifyingText()
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>
public java.lang.Object clone()
clone
in class VersionableEntity
VersionableEntity.clone()
,
Object.clone()
Copyright © 2007-2020 EDIT. All Rights Reserved.