public class FormUpdateBuilder extends StatementDocumentUpdateBuilder
FormUpdate
objects.Modifier and Type | Method and Description |
---|---|
FormUpdateBuilder |
append(FormUpdate update)
Replays all changes in provided update into this builder object.
|
FormUpdate |
build()
Creates new
StatementDocumentUpdate object with contents of this
builder object. |
static FormUpdateBuilder |
forBaseRevision(FormDocument revision)
Creates new builder object for constructing update of given base form entity
revision.
|
static FormUpdateBuilder |
forBaseRevisionId(FormIdValue formId,
long revisionId)
Creates new builder object for constructing update of form entity with given
revision ID.
|
static FormUpdateBuilder |
forEntityId(FormIdValue formId)
Creates new builder object for constructing update of form entity with given
ID.
|
FormUpdateBuilder |
setGrammaticalFeatures(Collection<ItemIdValue> features)
Sets grammatical features of the form.
|
FormUpdateBuilder |
updateRepresentations(TermUpdate update)
Updates form representations.
|
FormUpdateBuilder |
updateStatements(StatementUpdate update)
Updates entity statements.
|
forBaseRevision, forBaseRevisionId, forEntityId
forBaseRevision
public static FormUpdateBuilder forBaseRevisionId(FormIdValue formId, long revisionId)
formId
- ID of the form that is to be updatedrevisionId
- ID of the base form revision to be updated or zero if not
availableNullPointerException
- if formId
is null
IllegalArgumentException
- if formId
is a placeholder IDpublic static FormUpdateBuilder forEntityId(FormIdValue formId)
formId
- ID of the form that is to be updatedNullPointerException
- if formId
is null
IllegalArgumentException
- if formId
is a placeholder IDpublic static FormUpdateBuilder forBaseRevision(FormDocument revision)
revision
- base form entity revision to be updatedNullPointerException
- if revision
is null
IllegalArgumentException
- if revision
has placeholder IDpublic FormUpdateBuilder updateStatements(StatementUpdate update)
StatementDocumentUpdateBuilder
updateStatements
in class StatementDocumentUpdateBuilder
update
- statement update, possibly emptythis
(fluent method)public FormUpdateBuilder updateRepresentations(TermUpdate update)
update
- changes in form representationsthis
(fluent method)NullPointerException
- if update
is null
public FormUpdateBuilder setGrammaticalFeatures(Collection<ItemIdValue> features)
features
- new grammatical features of the formthis
(fluent method)NullPointerException
- if features
or any of its items is null
IllegalArgumentException
- if any item ID in features
is a placeholder ID or if
there are duplicate featurespublic FormUpdateBuilder append(FormUpdate update)
update
- form update to replaythis
(fluent method)NullPointerException
- if update
is null
IllegalArgumentException
- if update
cannot be applied to base entity revision (if
available)public FormUpdate 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