public class SenseUpdateBuilder extends StatementDocumentUpdateBuilder
SenseUpdate
objects.Modifier and Type | Method and Description |
---|---|
SenseUpdateBuilder |
append(SenseUpdate update)
Replays all changes in provided update into this builder object.
|
SenseUpdate |
build()
Creates new
StatementDocumentUpdate object with contents of this
builder object. |
static SenseUpdateBuilder |
forBaseRevision(SenseDocument revision)
Creates new builder object for constructing update of given base sense entity
revision.
|
static SenseUpdateBuilder |
forBaseRevisionId(SenseIdValue senseId,
long revisionId)
Creates new builder object for constructing update of sense entity with given
revision ID.
|
static SenseUpdateBuilder |
forEntityId(SenseIdValue senseId)
Creates new builder object for constructing update of sense entity with given
ID.
|
SenseUpdateBuilder |
updateGlosses(TermUpdate update)
Updates sense glosses.
|
SenseUpdateBuilder |
updateStatements(StatementUpdate update)
Updates entity statements.
|
forBaseRevision, forBaseRevisionId, forEntityId
forBaseRevision
public static SenseUpdateBuilder forBaseRevisionId(SenseIdValue senseId, long revisionId)
senseId
- ID of the sense that is to be updatedrevisionId
- ID of the base sense revision to be updated or zero if not
availableNullPointerException
- if senseId
is null
IllegalArgumentException
- if senseId
is a placeholder IDpublic static SenseUpdateBuilder forEntityId(SenseIdValue senseId)
senseId
- ID of the sense that is to be updatedNullPointerException
- if senseId
is null
IllegalArgumentException
- if senseId
is a placeholder IDpublic static SenseUpdateBuilder forBaseRevision(SenseDocument revision)
revision
- base sense entity revision to be updatedNullPointerException
- if revision
is null
IllegalArgumentException
- if revision
has placeholder IDpublic SenseUpdateBuilder updateStatements(StatementUpdate update)
StatementDocumentUpdateBuilder
updateStatements
in class StatementDocumentUpdateBuilder
update
- statement update, possibly emptythis
(fluent method)public SenseUpdateBuilder updateGlosses(TermUpdate update)
update
- changes in sense glossesthis
(fluent method)NullPointerException
- if update
is null
public SenseUpdateBuilder append(SenseUpdate update)
update
- sense update to replaythis
(fluent method)NullPointerException
- if update
is null
IllegalArgumentException
- if update
cannot be applied to base entity revision (if
available)public SenseUpdate build()
StatementDocumentUpdateBuilder
StatementDocumentUpdate
object with contents of this
builder object.build
in class StatementDocumentUpdateBuilder
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