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 ItemEditBuilder
addAlias(org.wikidata.wdtk.datamodel.interfaces.MonolingualTextValue alias)
Adds an alias to the item.ItemEditBuilder
addAliases(Set<org.wikidata.wdtk.datamodel.interfaces.MonolingualTextValue> aliases)
Adds a list of aliases to the item.ItemEditBuilder
addContributingRowId(long rowId)
Adds a row id which contributed to this update.ItemEditBuilder
addContributingRowIds(Collection<Long> rowIds)
Adds a collection of row ids which contributed to this update.ItemEditBuilder
addDescription(org.wikidata.wdtk.datamodel.interfaces.MonolingualTextValue description, boolean override)
Adds a description to the item.ItemEditBuilder
addDescriptions(Set<org.wikidata.wdtk.datamodel.interfaces.MonolingualTextValue> descriptions, boolean override)
Adds a list of descriptions to the item.ItemEditBuilder
addLabel(org.wikidata.wdtk.datamodel.interfaces.MonolingualTextValue label, boolean override)
Adds a label to the entity.ItemEditBuilder
addLabels(Set<org.wikidata.wdtk.datamodel.interfaces.MonolingualTextValue> labels, boolean override)
Adds a list of labels to the entity.ItemEditBuilder
addStatement(StatementEdit statement)
Adds an update to a statement.ItemEditBuilder
addStatements(List<StatementEdit> statements)
Add a list of statement, as inaddStatement(org.openrefine.wikibase.updates.StatementEdit)
.ItemEdit
build()
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.
-
-