public class ItemUpdateBuilder extends TermedDocumentUpdateBuilder
ItemUpdate objects.| Modifier and Type | Method and Description |
|---|---|
ItemUpdateBuilder |
append(ItemUpdate update)
Replays all changes in provided update into this builder object.
|
ItemUpdate |
build()
Creates new
TermedStatementDocumentUpdate object with contents of
this builder object. |
static ItemUpdateBuilder |
forBaseRevision(ItemDocument revision)
Creates new builder object for constructing update of given base item entity
revision.
|
static ItemUpdateBuilder |
forBaseRevisionId(ItemIdValue itemId,
long revisionId)
Creates new builder object for constructing update of item entity with given
revision ID.
|
static ItemUpdateBuilder |
forEntityId(ItemIdValue itemId)
Creates new builder object for constructing update of item entity with given
ID.
|
ItemUpdateBuilder |
putSiteLink(SiteLink link)
Adds or replaces site link.
|
ItemUpdateBuilder |
removeSiteLink(String site)
Removes site link.
|
ItemUpdateBuilder |
updateAliases(String language,
AliasUpdate update)
Updates entity aliases.
|
ItemUpdateBuilder |
updateDescriptions(TermUpdate update)
Updates entity descriptions.
|
ItemUpdateBuilder |
updateLabels(TermUpdate update)
Updates entity labels.
|
ItemUpdateBuilder |
updateStatements(StatementUpdate update)
Updates entity statements.
|
forBaseRevision, forBaseRevisionId, forEntityIdforBaseRevisionforBaseRevisionforBaseRevisionpublic static ItemUpdateBuilder forBaseRevisionId(ItemIdValue itemId, long revisionId)
itemId - ID of the item entity that is to be updatedrevisionId - ID of the base item revision to be updated or zero if not
availableNullPointerException - if itemId is nullIllegalArgumentException - if itemId is a placeholder IDpublic static ItemUpdateBuilder forEntityId(ItemIdValue itemId)
itemId - ID of the item entity that is to be updatedNullPointerException - if itemId is nullIllegalArgumentException - if itemId is a placeholder IDpublic static ItemUpdateBuilder forBaseRevision(ItemDocument revision)
revision - base item entity revision to be updatedNullPointerException - if revision is nullIllegalArgumentException - if revision has placeholder IDpublic ItemUpdateBuilder updateStatements(StatementUpdate update)
StatementDocumentUpdateBuilderupdateStatements in class TermedDocumentUpdateBuilderupdate - statement update, possibly emptythis (fluent method)public ItemUpdateBuilder updateLabels(TermUpdate update)
LabeledDocumentUpdateBuilderupdateLabels in class TermedDocumentUpdateBuilderupdate - changes in entity labelsthis (fluent method)public ItemUpdateBuilder updateDescriptions(TermUpdate update)
TermedDocumentUpdateBuilderupdateDescriptions in class TermedDocumentUpdateBuilderupdate - changes in entity descriptionsthis (fluent method)public ItemUpdateBuilder updateAliases(String language, AliasUpdate update)
TermedDocumentUpdateBuilderupdateAliases in class TermedDocumentUpdateBuilderlanguage - language code of the altered aliasesupdate - alias changesthis (fluent method)public ItemUpdateBuilder putSiteLink(SiteLink link)
removeSiteLink(String).
If base entity revision was provided, attempt to overwrite some site link with identical site link will be silently ignored, resulting in empty update.
link - new or replacement site linkthis (fluent method)NullPointerException - if link is nullpublic ItemUpdateBuilder removeSiteLink(String site)
putSiteLink(SiteLink).
If base entity revision was provided, attempts to remove missing site links will be silently ignored, resulting in empty update.
site - site key of the removed site linkthis (fluent method)NullPointerException - if site is nullIllegalArgumentException - if site is blankpublic ItemUpdateBuilder append(ItemUpdate update)
update - item update to replaythis (fluent method)NullPointerException - if update is nullIllegalArgumentException - if update cannot be applied to base entity revision (if
available)public ItemUpdate build()
TermedDocumentUpdateBuilderTermedStatementDocumentUpdate object with contents of
this builder object.build in class TermedDocumentUpdateBuilderCopyright © 2014–2022 Wikidata Toolkit Developers. Generated from source code published under the Apache License 2.0. For more information, see the Wikidata Toolkit homepage