public class PropertyUpdateBuilder extends TermedDocumentUpdateBuilder
PropertyUpdate
objects.Modifier and Type | Method and Description |
---|---|
PropertyUpdateBuilder |
append(PropertyUpdate update)
Replays all changes in provided update into this builder object.
|
PropertyUpdate |
build()
Creates new
TermedStatementDocumentUpdate object with contents of
this builder object. |
static PropertyUpdateBuilder |
forBaseRevision(PropertyDocument revision)
Creates new builder object for constructing update of given base property
entity revision.
|
static PropertyUpdateBuilder |
forBaseRevisionId(PropertyIdValue propertyId,
long revisionId)
Creates new builder object for constructing update of property entity with
given revision ID.
|
static PropertyUpdateBuilder |
forEntityId(PropertyIdValue propertyId)
Creates new builder object for constructing update of property entity with
given ID.
|
PropertyUpdateBuilder |
updateAliases(String language,
AliasUpdate update)
Updates entity aliases.
|
PropertyUpdateBuilder |
updateDescriptions(TermUpdate update)
Updates entity descriptions.
|
PropertyUpdateBuilder |
updateLabels(TermUpdate update)
Updates entity labels.
|
PropertyUpdateBuilder |
updateStatements(StatementUpdate update)
Updates entity statements.
|
forBaseRevision, forBaseRevisionId, forEntityId
forBaseRevision
forBaseRevision
forBaseRevision
public static PropertyUpdateBuilder forBaseRevisionId(PropertyIdValue propertyId, long revisionId)
propertyId
- ID of the property entity that is to be updatedrevisionId
- ID of the base property revision to be updated or zero if not
availableNullPointerException
- if propertyId
is null
IllegalArgumentException
- if propertyId
is a placeholder IDpublic static PropertyUpdateBuilder forEntityId(PropertyIdValue propertyId)
propertyId
- ID of the property entity that is to be updatedNullPointerException
- if propertyId
is null
IllegalArgumentException
- if propertyId
is a placeholder IDpublic static PropertyUpdateBuilder forBaseRevision(PropertyDocument revision)
revision
- base property entity revision to be updatedNullPointerException
- if revision
is null
IllegalArgumentException
- if revision
has placeholder IDpublic PropertyUpdateBuilder updateStatements(StatementUpdate update)
StatementDocumentUpdateBuilder
updateStatements
in class TermedDocumentUpdateBuilder
update
- statement update, possibly emptythis
(fluent method)public PropertyUpdateBuilder updateLabels(TermUpdate update)
LabeledDocumentUpdateBuilder
updateLabels
in class TermedDocumentUpdateBuilder
update
- changes in entity labelsthis
(fluent method)public PropertyUpdateBuilder updateDescriptions(TermUpdate update)
TermedDocumentUpdateBuilder
updateDescriptions
in class TermedDocumentUpdateBuilder
update
- changes in entity descriptionsthis
(fluent method)public PropertyUpdateBuilder updateAliases(String language, AliasUpdate update)
TermedDocumentUpdateBuilder
updateAliases
in class TermedDocumentUpdateBuilder
language
- language code of the altered aliasesupdate
- alias changesthis
(fluent method)public PropertyUpdateBuilder append(PropertyUpdate update)
update
- property update to replaythis
(fluent method)NullPointerException
- if update
is null
IllegalArgumentException
- if update
cannot be applied to base entity revision (if
available)public PropertyUpdate build()
TermedDocumentUpdateBuilder
TermedStatementDocumentUpdate
object with contents of
this builder object.build
in class TermedDocumentUpdateBuilder
Copyright © 2014–2024 Wikidata Toolkit Developers. Generated from source code published under the Apache License 2.0. For more information, see the Wikidata Toolkit homepage