public class MediaInfoUpdateBuilder extends LabeledDocumentUpdateBuilder
MediaInfoUpdate
objects.Modifier and Type | Method and Description |
---|---|
MediaInfoUpdateBuilder |
apply(MediaInfoUpdate update)
Replays all changes in provided update into this builder object.
|
MediaInfoUpdate |
build()
Creates new
LabeledStatementDocumentUpdate object with contents of
this builder object. |
static MediaInfoUpdateBuilder |
forBaseRevision(MediaInfoDocument revision)
Creates new builder object for constructing update of given base media entity
revision.
|
static MediaInfoUpdateBuilder |
forBaseRevisionId(MediaInfoIdValue mediaInfoId,
long revisionId)
Creates new builder object for constructing update of media entity with given
revision ID.
|
static MediaInfoUpdateBuilder |
forEntityId(MediaInfoIdValue mediaInfoId)
Creates new builder object for constructing update of media entity with given
ID.
|
MediaInfoUpdateBuilder |
updateLabels(TermUpdate update)
Updates entity labels.
|
MediaInfoUpdateBuilder |
updateStatements(StatementUpdate update)
Updates entity statements.
|
forBaseRevision, forBaseRevisionId, forEntityId
forBaseRevision
forBaseRevision
public static MediaInfoUpdateBuilder forBaseRevisionId(MediaInfoIdValue mediaInfoId, long revisionId)
mediaInfoId
- ID of the media entity that is to be updatedrevisionId
- ID of the base media entity revision to be updated or zero if not
availableNullPointerException
- if mediaInfoId
is null
IllegalArgumentException
- if mediaInfoId
is a placeholder IDpublic static MediaInfoUpdateBuilder forEntityId(MediaInfoIdValue mediaInfoId)
mediaInfoId
- ID of the media entity that is to be updatedNullPointerException
- if mediaInfoId
is null
IllegalArgumentException
- if mediaInfoId
is a placeholder IDpublic static MediaInfoUpdateBuilder forBaseRevision(MediaInfoDocument revision)
revision
- base media entity revision to be updatedNullPointerException
- if revision
is null
IllegalArgumentException
- if revision
has placeholder IDpublic MediaInfoUpdateBuilder updateStatements(StatementUpdate update)
StatementDocumentUpdateBuilder
updateStatements
in class LabeledDocumentUpdateBuilder
update
- statement update, possibly emptythis
(fluent method)public MediaInfoUpdateBuilder updateLabels(TermUpdate update)
LabeledDocumentUpdateBuilder
updateLabels
in class LabeledDocumentUpdateBuilder
update
- changes in entity labelsthis
(fluent method)public MediaInfoUpdateBuilder apply(MediaInfoUpdate update)
update
- media update to replaythis
(fluent method)NullPointerException
- if update
is null
IllegalArgumentException
- if update
cannot be applied to base entity revision (if
available)public MediaInfoUpdate build()
LabeledDocumentUpdateBuilder
LabeledStatementDocumentUpdate
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