Package org.openrefine.wikibase.updates
Class ItemEditBuilder
- java.lang.Object
-
- org.openrefine.wikibase.updates.ItemEditBuilder
-
-
Constructor Summary
Constructors Constructor Description ItemEditBuilder(org.wikidata.wdtk.datamodel.interfaces.EntityIdValue id)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ItemEditBuilderaddAlias(org.wikidata.wdtk.datamodel.interfaces.MonolingualTextValue alias)Adds an alias to the item.ItemEditBuilderaddAliases(Set<org.wikidata.wdtk.datamodel.interfaces.MonolingualTextValue> aliases)Adds a list of aliases to the item.ItemEditBuilderaddContributingRowId(long rowId)Adds a row id which contributed to this update.ItemEditBuilderaddContributingRowIds(Collection<Long> rowIds)Adds a collection of row ids which contributed to this update.ItemEditBuilderaddDescription(org.wikidata.wdtk.datamodel.interfaces.MonolingualTextValue description, boolean override)Adds a description to the item.ItemEditBuilderaddDescriptions(Set<org.wikidata.wdtk.datamodel.interfaces.MonolingualTextValue> descriptions, boolean override)Adds a list of descriptions to the item.ItemEditBuilderaddLabel(org.wikidata.wdtk.datamodel.interfaces.MonolingualTextValue label, boolean override)Adds a label to the entity.ItemEditBuilderaddLabels(Set<org.wikidata.wdtk.datamodel.interfaces.MonolingualTextValue> labels, boolean override)Adds a list of labels to the entity.ItemEditBuilderaddStatement(StatementEdit statement)Adds an update to a statement.ItemEditBuilderaddStatements(List<StatementEdit> statements)Add a list of statement, as inaddStatement(org.openrefine.wikibase.updates.StatementEdit).ItemEditbuild()Constructs theItemEdit.
-
-
-
Method Detail
-
addStatement
public ItemEditBuilder addStatement(StatementEdit statement)
Adds an update to a statement.- Parameters:
statement- the statement to add or update
-
addStatements
public ItemEditBuilder addStatements(List<StatementEdit> statements)
Add a list of statement, as inaddStatement(org.openrefine.wikibase.updates.StatementEdit).- Parameters:
statements- the statements to add
-
addLabel
public ItemEditBuilder addLabel(org.wikidata.wdtk.datamodel.interfaces.MonolingualTextValue label, boolean override)
Adds a label to the entity.- Parameters:
label- the label to addoverride- whether the label should be added even if there is already a label in that language
-
addLabels
public ItemEditBuilder addLabels(Set<org.wikidata.wdtk.datamodel.interfaces.MonolingualTextValue> labels, boolean override)
Adds a list of labels to the entity.- Parameters:
labels- the labels to addoverride- whether the label should be added even if there is already a label in that language
-
addDescription
public ItemEditBuilder addDescription(org.wikidata.wdtk.datamodel.interfaces.MonolingualTextValue description, boolean override)
Adds a description to the item.- Parameters:
description- the description to addoverride- whether the description should be added even if there is already a description in that language
-
addDescriptions
public ItemEditBuilder addDescriptions(Set<org.wikidata.wdtk.datamodel.interfaces.MonolingualTextValue> descriptions, boolean override)
Adds a list of descriptions to the item.- Parameters:
descriptions- the descriptions to addoverride- whether the description should be added even if there is already a description in that language
-
addAlias
public ItemEditBuilder addAlias(org.wikidata.wdtk.datamodel.interfaces.MonolingualTextValue alias)
Adds an alias to the item. It will be added to any existing aliases in that language.- Parameters:
alias- the alias to add
-
addAliases
public ItemEditBuilder addAliases(Set<org.wikidata.wdtk.datamodel.interfaces.MonolingualTextValue> aliases)
Adds a list of aliases to the item. They will be added to any existing aliases in each language.- Parameters:
aliases- the aliases to add
-
addContributingRowId
public ItemEditBuilder addContributingRowId(long rowId)
Adds a row id which contributed to this update.
-
addContributingRowIds
public ItemEditBuilder addContributingRowIds(Collection<Long> rowIds)
Adds a collection of row ids which contributed to this update.
-
-