public interface TermedDocument extends LabeledDocument
| Modifier and Type | Method and Description |
|---|---|
default String |
findDescription(String languageCode)
Returns the string description for the given language code, or null if
there is no description for this code.
|
Map<String,List<MonolingualTextValue>> |
getAliases()
Return a Map from Wikibase language codes to lists of alias labels for a
given language.
|
Map<String,MonolingualTextValue> |
getDescriptions()
Return a Map from Wikibase language codes to descriptions.
|
TermedDocument |
withAliases(String language,
List<MonolingualTextValue> aliases)
Returns a new version of this document with a new list of aliases
for the given language code.
|
TermedDocument |
withDescription(MonolingualTextValue newDescription)
Returns a new version of this document with a new description
(which overrides any existing description).
|
TermedDocument |
withLabel(MonolingualTextValue newLabel)
Returns a new version of this document with a new label
(which overrides any existing label for this language).
|
TermedDocument |
withRevisionId(long newRevisionId)
Returns a copy of this document with an updated revision id.
|
findLabel, getLabelsgetEntityId, getRevisionIdMap<String,MonolingualTextValue> getDescriptions()
Map<String,List<MonolingualTextValue>> getAliases()
default String findDescription(String languageCode)
getDescriptions().languageCode - a string that represents languageTermedDocument withRevisionId(long newRevisionId)
withRevisionId in interface EntityDocumentwithRevisionId in interface LabeledDocumentTermedDocument withLabel(MonolingualTextValue newLabel)
withLabel in interface LabeledDocumentTermedDocument withDescription(MonolingualTextValue newDescription)
TermedDocument withAliases(String language, List<MonolingualTextValue> aliases)
language - the language code for which the aliases should be setaliases - the aliases to set for this language. The language codes they
contain should all match the supplied language.Copyright © 2014–2022 Wikidata Toolkit Developers. Generated from source code published under the Apache License 2.0. For more information, see the Wikidata Toolkit homepage