public abstract class TermedDocumentUpdateBuilder extends LabeledDocumentUpdateBuilder
TermedStatementDocumentUpdate
objects.Modifier | Constructor and Description |
---|---|
protected |
TermedDocumentUpdateBuilder(EntityIdValue entityId,
long revisionId)
Initializes new builder object for constructing update of entity with given
ID.
|
protected |
TermedDocumentUpdateBuilder(TermedStatementDocument revision)
Initializes new builder object for constructing update of given base entity
revision.
|
Modifier and Type | Method and Description |
---|---|
abstract TermedStatementDocumentUpdate |
build()
Creates new
TermedStatementDocumentUpdate object with contents of
this builder object. |
static TermedDocumentUpdateBuilder |
forBaseRevision(TermedStatementDocument revision)
Creates new builder object for constructing update of given base entity
revision.
|
static TermedDocumentUpdateBuilder |
forBaseRevisionId(EntityIdValue entityId,
long revisionId)
Creates new builder object for constructing update of entity with given
revision ID.
|
static TermedDocumentUpdateBuilder |
forEntityId(EntityIdValue entityId)
Creates new builder object for constructing update of entity with given ID.
|
TermedDocumentUpdateBuilder |
updateAliases(String language,
AliasUpdate update)
Updates entity aliases.
|
TermedDocumentUpdateBuilder |
updateDescriptions(TermUpdate update)
Updates entity descriptions.
|
TermedDocumentUpdateBuilder |
updateLabels(TermUpdate update)
Updates entity labels.
|
TermedDocumentUpdateBuilder |
updateStatements(StatementUpdate update)
Updates entity statements.
|
forBaseRevision
forBaseRevision
forBaseRevision
protected TermedDocumentUpdateBuilder(EntityIdValue entityId, long revisionId)
entityId
- ID of the entity that is to be updatedrevisionId
- ID of the base entity revision to be updated or zero if not
availableNullPointerException
- if entityId
is null
IllegalArgumentException
- if entityId
is a placeholder IDprotected TermedDocumentUpdateBuilder(TermedStatementDocument revision)
revision
- base entity revision to be updatedNullPointerException
- if revision
is null
IllegalArgumentException
- if revision
has placeholder IDpublic static TermedDocumentUpdateBuilder forBaseRevisionId(EntityIdValue entityId, long revisionId)
Supported entity IDs include ItemIdValue
and PropertyIdValue
.
entityId
- ID of the entity that is to be updatedrevisionId
- ID of the base entity revision to be updated or zero if not
availableNullPointerException
- if entityId
is null
IllegalArgumentException
- if entityId
is of unrecognized type or it is a
placeholder IDpublic static TermedDocumentUpdateBuilder forEntityId(EntityIdValue entityId)
Supported entity IDs include ItemIdValue
and PropertyIdValue
.
entityId
- ID of the entity that is to be updatedNullPointerException
- if entityId
is null
IllegalArgumentException
- if entityId
is of unrecognized type or it is a
placeholder IDpublic static TermedDocumentUpdateBuilder forBaseRevision(TermedStatementDocument revision)
Supported entity types include ItemDocument
and
PropertyDocument
.
revision
- base entity revision to be updatedNullPointerException
- if revision
is null
IllegalArgumentException
- if revision
is of unrecognized type or its ID is a
placeholder IDpublic TermedDocumentUpdateBuilder updateStatements(StatementUpdate update)
StatementDocumentUpdateBuilder
updateStatements
in class LabeledDocumentUpdateBuilder
update
- statement update, possibly emptythis
(fluent method)public TermedDocumentUpdateBuilder updateLabels(TermUpdate update)
LabeledDocumentUpdateBuilder
updateLabels
in class LabeledDocumentUpdateBuilder
update
- changes in entity labelsthis
(fluent method)public TermedDocumentUpdateBuilder updateDescriptions(TermUpdate update)
update
- changes in entity descriptionsthis
(fluent method)NullPointerException
- if update
is null
public TermedDocumentUpdateBuilder updateAliases(String language, AliasUpdate update)
language
- language code of the altered aliasesupdate
- alias changesthis
(fluent method)NullPointerException
- if language
or aliases
is null
IllegalArgumentException
- if language
is blank or aliases
has inconsistent
language codepublic abstract TermedStatementDocumentUpdate build()
TermedStatementDocumentUpdate
object with contents of
this builder object.build
in class LabeledDocumentUpdateBuilder
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