public abstract class DesciptionElementFormatterBase<T extends DescriptionElementBase> extends DefaultCdmFormatter
DescriptionElementBase
instances.ICdmFormatter.FormatKey
Modifier and Type | Field and Description |
---|---|
protected static java.lang.String |
MISSING_TERM_LABEL |
formatKeyMap, formatKeys
Modifier | Constructor and Description |
---|---|
protected |
DesciptionElementFormatterBase(java.lang.Object object,
ICdmFormatter.FormatKey[] formatKeys,
java.lang.Class<T> clazz) |
Modifier and Type | Method and Description |
---|---|
protected abstract java.lang.String |
doFormat(T descEl) |
java.lang.String |
format(java.lang.Object object)
Returns a string representation of the given object.
Note: Only use this method if the formatKeys for this ICdmFormatter have been set before. |
java.lang.String |
format(java.lang.Object object,
ICdmFormatter.FormatKey... formatKeys)
Returns a string representation of the given object.
The is built according to the formatKeys passed as arguments. E.g. |
protected java.lang.String |
getLabel(DefinedTermBase<?> term,
java.util.List<Language> preferredLanguages) |
initFormatKeys, isBlank, isNotBlank
protected static final java.lang.String MISSING_TERM_LABEL
protected DesciptionElementFormatterBase(java.lang.Object object, ICdmFormatter.FormatKey[] formatKeys, java.lang.Class<T> clazz)
public java.lang.String format(java.lang.Object object, ICdmFormatter.FormatKey... formatKeys)
ICdmFormatter
format(derivedUnit, GATHERING_COUNTRY, COMMA, GATHERING_COLLECTOR, COMMA, OPEN_BRACKET, COLLECTION_CODE, CLOSE_BRACKET
will result in something like Peru, L. (B)
Note:format
in interface ICdmFormatter
format
in class DefaultCdmFormatter
object
- the object which should be formatted as a string representationformatKeys
- a list of enum values specifying the parts of which the string consistspublic java.lang.String format(java.lang.Object object)
ICdmFormatter
format
in interface ICdmFormatter
format
in class DefaultCdmFormatter
object
- the object which should be formatted as a string representationprotected abstract java.lang.String doFormat(T descEl)
protected java.lang.String getLabel(DefinedTermBase<?> term, java.util.List<Language> preferredLanguages)
Copyright © 2007-2020 EDIT. All Rights Reserved.