@Entity @Indexed(index="eu.etaxonomy.cdm.model.description.DescriptionElementBase") public class CategoricalData extends DescriptionElementBase
quantitative data
on one side and to literal data on
the other side). Only taxon descriptions
and
specimen descriptions
may contain categorical data.feature
for instance can be described with
state terms
such as "blue" or "white". If the color of petals of a
particular tree is described as "mostly blue" and "exceptionally white" two
state data
instances must be assigned to an instance of the
present class: the first one with the state "blue" and the modifier
"mostly" and the second one with the state "white" and the modifier "exceptionally".
Whenever more than one state data belongs to a categorical data they should be
interpreted as being related by the inclusive disjunction "or".
This class corresponds partially to CodedDescriptionType according to the SDD schema.
annotations, markers
CLOB_LENGTH, uuid
Modifier | Constructor and Description |
---|---|
protected |
CategoricalData()
Class constructor: creates a new empty categorical data instance.
|
protected |
CategoricalData(java.util.List<State> states,
Feature feature)
Class constructor: creates a new empty categorical data instance.
|
Modifier and Type | Method and Description |
---|---|
void |
addStateData(State state)
Convenience method which creates a state data from a given state with no modifiers
and adds it to the list of state data
|
void |
addStateData(StateData stateData)
|
java.lang.Object |
clone()
Clones this categorical data.
|
boolean |
getOrderRelevant()
Returns the boolean value of the flag indicating whether the sequence of
state data belonging to this categorical data is intentional
(true) and therefore relevant for interpretation or analysis or not (false). |
java.util.List<StateData> |
getStateData()
|
java.util.List<State> |
getStatesOnly()
Convenience method which returns only the list of states.
|
boolean |
isCharacterData()
Is this description item of a class type which is considered to
represent character data? These classes are
QuantitativeData
and CategoricalData . |
static CategoricalData |
NewInstance()
Creates a new empty categorical data instance.
|
static CategoricalData |
NewInstance(Feature feature) |
static CategoricalData |
NewInstance(State state,
Feature feature)
Creates a new empty categorical data instance.
|
void |
removeStateData(StateData stateData)
|
void |
setOrderRelevant(boolean orderRelevant) |
protected void |
setStateData(java.util.List<StateData> stateData)
Deprecated.
|
java.util.List<StateData> |
setStateDataOnly(java.util.List<State> states)
Convenience method which to set the list of states (no modifiers or modifying text allowed).
|
java.lang.String |
toString()
Overrides
Object.toString() . |
addAggregationSource, addImportSource, addMedia, addModifier, addModifyingText, addModifyingText, addPrimaryTaxonomicSource, addPrimaryTaxonomicSource, addSource, addSource, addSource, addSource, addSources, clone, getFeature, getInDescription, getMedia, getModifiers, getModifiers, getModifyingText, getSortIndex, getSources, getTimeperiod, makeModifierMap, putModifyingText, putModifyingText, removeMedia, removeModifier, removeModifyingText, removeSource, setFeature, setInDescription, setSortIndex, setTimeperiod
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, 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
protected CategoricalData()
public static CategoricalData NewInstance()
public static CategoricalData NewInstance(Feature feature)
habitat
- public static CategoricalData NewInstance(State state, Feature feature)
public java.util.List<StateData> getStateData()
@Deprecated protected void setStateData(java.util.List<StateData> stateData)
public void addStateData(StateData stateData)
state
- the state to be added to this categorical datagetStateData()
public void addStateData(State state)
state
- addStateData(StateData)
public void removeStateData(StateData stateData)
states
describing the feature
corresponding to this categorical data.state
- the state which should be removedgetStateData()
,
addStateData(State)
public boolean getOrderRelevant()
state data
belonging to this categorical data is intentional
(true) and therefore relevant for interpretation or analysis or not (false).
The use of this flag depends mostly on the feature
of this categorical data.public void setOrderRelevant(boolean orderRelevant)
getOrderRelevant()
public java.util.List<State> getStatesOnly()
public java.util.List<StateData> setStateDataOnly(java.util.List<State> states)
public boolean isCharacterData()
DescriptionElementBase
QuantitativeData
and CategoricalData
.
To be overridden by these classes.isCharacterData
in class DescriptionElementBase
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 DescriptionElementBase
DescriptionElementBase.clone()
,
Object.clone()
Copyright © 2007-2020 EDIT. All Rights Reserved.