T - the type of the eventual concrete builder implementationO - the type of the object that is being builtpublic abstract class EntityDocumentBuilder<T extends EntityDocumentBuilder<T,O>,O extends TermedStatementDocument> extends AbstractDataObjectBuilder<T,O>
EntityDocument
objects.| Modifier | Constructor and Description |
|---|---|
protected |
EntityDocumentBuilder(EntityIdValue entityIdValue) |
protected |
EntityDocumentBuilder(O initialDocument)
Starts constructing an EntityDocument from an initial version
of this document.
|
| Modifier and Type | Method and Description |
|---|---|
protected List<StatementGroup> |
getStatementGroups()
Returns a list of
StatementGroup objects for the currently stored
statements. |
T |
withAlias(MonolingualTextValue mtv)
Adds an additional alias to the constructed document.
|
T |
withAlias(String text,
String languageCode)
Adds an additional alias to the constructed document.
|
T |
withDescription(MonolingualTextValue mtv)
Adds an additional description to the constructed document.
|
T |
withDescription(String text,
String languageCode)
Adds an additional description to the constructed document.
|
T |
withEntityId(EntityIdValue entityId)
Changes the entity value id for the constructed document.
|
T |
withLabel(MonolingualTextValue mtv)
Adds an additional label to the constructed document.
|
T |
withLabel(String text,
String languageCode)
Adds an additional label to the constructed document.
|
T |
withRevisionId(long revisionId)
Sets the revision id for the constructed document.
|
T |
withStatement(Statement statement)
Adds an additional statement to the constructed document.
|
build, getThis, prepareBuildprotected EntityDocumentBuilder(EntityIdValue entityIdValue)
protected EntityDocumentBuilder(O initialDocument)
initialDocument - the initial version of the document to usepublic T withRevisionId(long revisionId)
EntityDocument.getRevisionId().revisionId - the revision idpublic T withEntityId(EntityIdValue entityId)
EntityDocument.getEntityId().entityId - the entity idpublic T withLabel(MonolingualTextValue mtv)
mtv - the additional labelpublic T withLabel(String text, String languageCode)
text - the text of the labellanguageCode - the language code of the labelpublic T withDescription(MonolingualTextValue mtv)
mtv - the additional descriptionpublic T withDescription(String text, String languageCode)
text - the text of the descriptionlanguageCode - the language code of the descriptionpublic T withAlias(MonolingualTextValue mtv)
mtv - the additional aliaspublic T withAlias(String text, String languageCode)
text - the text of the aliaslanguageCode - the language code of the aliaspublic T withStatement(Statement statement)
statement - the additional statementprotected List<StatementGroup> getStatementGroups()
StatementGroup objects for the currently stored
statements.Copyright © 2014–2022 Wikidata Toolkit Developers. Generated from source code published under the Apache License 2.0. For more information, see the Wikidata Toolkit homepage